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
When I use [email protected] or 5.7 and set the fork-ts-checker-webpack-plugin's option typescript.build to true, the following problem occurs.
Current behavior
The webpack build completes with no errors even if there are type errors in source code such as:
constnum: number='aaa';// TS2322: Type 'string' is not assignable to type 'number'.functionfoo(num: number){}foo('aaa');// TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
Not sure if this is relevant, but I see the following messages during the build:
TypeError: The "path" argument must be of type string. Received undefined
TypeError: Cannot read properties of undefined (reading 'includes')
Expected behavior
The webpack build raises errors such as:
ERROR in ./index.ts:1:7
TS2322: Type 'string' is not assignable to type 'number'.
> 1 | const num: number = 'aaa';
| ^^^
2 |
3 | function foo(num: number) {}
4 | foo('aaa');
ERROR in ./index.ts:4:5
TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
2 |
3 | function foo(num: number) {}
> 4 | foo('aaa');
| ^^^^^
5 |
Steps to reproduce the issue
Clone the repository described below.
npm ci
npx webpack
In addition, it works fine if you exec npm i [email protected] before the build.
kku39
changed the title
Type Checking Not Performed with TypeScript 5.6+ and build: true Option
Type Checking Not Works with TypeScript 5.6+ and build: true Option
Feb 17, 2025
When I use [email protected] or 5.7 and set the fork-ts-checker-webpack-plugin's option
typescript.build
totrue
, the following problem occurs.Current behavior
The webpack build completes with no errors even if there are type errors in source code such as:
Not sure if this is relevant, but I see the following messages during the build:
Expected behavior
The webpack build raises errors such as:
Steps to reproduce the issue
npm ci
npx webpack
In addition, it works fine if you exec
npm i [email protected]
before the build.Issue reproduction repository
https://github.com/kku39/issue-repro-of-fork-ts-checker-webpack-plugin
Environment
The text was updated successfully, but these errors were encountered: