-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Turn on TypeScript 'strict' compiler option? #22
Comments
Thanks for the pointer. It looks like this turns on four things: I'm curious how this is supposed to be handled. Do you have to use a lot of |
I think so - I don't have a ton of experience with it yet. If you already have type aliases set up, you can add See also "Nullable types" in https://www.typescriptlang.org/docs/handbook/advanced-types.html |
The strict null checking probably does take the most work to satisfy. We haven't turned it on for some of our codebases yet either. |
You might consider turning on the compiler 'strict' option (see https://www.typescriptlang.org/docs/handbook/compiler-options.html) in your tsconfig, which turns on a few options related to making the type checking more strict. For example, it turns on the strict null checking to help guard against errors involving null or undefined, etc. The nice thing about using 'strict' is that it will automatically updated in each TS release to be the recommended set of strict options. Alternatively, you might look at enabling individually each of the options 'strict' enables.
The text was updated successfully, but these errors were encountered: