In an Angular CLI project, when using an unsupported version of TypeScript you may get the following warning:
@angular/[email protected] requires typescript@'>=X.X.X <Y.Y.Y' but Z.Z.Z was found instead.
Using this version can result in undefined behaviour and difficult to debug problems.
It is possible to disable the TypeScript mismatch warning for the default project with the following command:
ng config cli.warnings.typescriptMismatch false
Now, when building an Angular library, ng-packagr
throws this warning as an error, even with the typescriptMismatch
setting set to false
. Is it possible to temporarily disable this error? It is understood that this should not be done in a production environment, but it may be helpful when debugging issues that may be caused by TypeScript. The following StackOverflow question serves as an example use case.