You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Be able to change skipLibCheck flag in command lineΒ #45691
Add a new --skipLibCheck [bool] flag to tsc when using --build. This flag would override the skipLibCheck value in all tsconfig.json files for all projects checked in the build.
π Search Terms
performance
skipLibCheck
β Viability Checklist
My suggestion meets these guidelines:
This wouldn't be a breaking change in existing TypeScript/JavaScript code
This wouldn't change the runtime behavior of existing JavaScript code
This could be implemented without emitting different JS based on the types of the expressions
This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
We are interested in leveraging skipLibCheck when using the typescript checker in order to avoid expensive checks on large .d.ts files from external libraries that we include as node modules. That said, we recognize that there is some danger in skipLibCheck. For example, a third party module may have been checked with a different version of tsc, or with different levels of strictness. We would feel more comfortable with a workflow that allows us to check libs when we import a new version of a node module, upgrade the tsc compiler, or change compiler flags.
In order to do this, we request that tsc support a --skipLibCheck (bool) flag when using --build. This flag would override the skipLibCheck compiler option in the tsconfig.json file (and the tsconfig.json file for all project references).
π Motivating Example
As a motivating example, node_modules/@types/lodash/ts3.1/common/common.d.ts, a dependency we take in all of our projects, takes 1.25 seconds to check on my dev machine. Without skipLibCheck, the overhead of splitting our monorepo into smaller projects is too high to justify the work.
π» Use Cases
We generally want to set "skipLibCheck": true in our tsconfig.json files, but we want a workflow that allows us to check libs when we import a new version of a node module, upgrade the tsc compiler, or change compiler flags.
In the meantime you could create a second tsconfig file that extends your existing one, and just changes the skipLibCheck value. Then when executing the compiler point to your second config file.
Activity
MartinJohns commentedon Sep 2, 2021
Duplicate of #25613.
MartinJohns commentedon Sep 2, 2021
In the meantime you could create a second tsconfig file that extends your existing one, and just changes the
skipLibCheckvalue. Then when executing the compiler point to your second config file.MarcCelani-at commentedon Sep 2, 2021
Implement --skipLibCheck flag in tsbuild
typescript-bot commentedon Sep 7, 2021
This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.