I had some issues building my TypeScript project because the type definitions of a library had errors.
The solution was to add the strictNullChecks
flag.
That's really counter-intuitive to me. How does adding restrictions remove errors? Usually, it's the other way around.
The error that I had can be found on this GitHub issue.
Also, as this user pointed out:
it doesn't make sense that a
strict
project cannot build in a non strict one
I tried to understand their typings, but they are using advanced TypeScript features with deep generic types and they didn't documented their code.