SolidJSS
SolidJSโ€ข3y agoโ€ข
4 replies
Bersaelor

Favorite way of dealing with typescripts `!`-forbidden warnings

For example, I often do:

const MiddleContainer: ParentComponent = (props) => {
  const { isAuthenticated } = useAuthState()!;


I know my code is wrapped in an AuthContextProvider, and I want it to crash/error out in case I ever miss the context provider.
How do you tell typescript-eslint to shut up about these cases?
Was this page helpful?