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
It appears like ts-loader causes the TS compiler to parse .d.ts files in a different mode than what the compiler normally does?
From a working ts-loader based project (occurs on both webpack 1 & 2), on typescript 2.1:
Set "strictNullChecks": true"
Import a module that has a function that is declared with an optional options argument that is also destructured. In my case, that's apollo-client's constructor.
Running ./node_modules/.bin/tsc directly compiles without complaint. Running ts-loader results in:
ERROR in /node_modules/apollo-client/lib/src/ApolloClient.d.ts
(28,18): error TS2459: Type '{ networkInterface?: NetworkInterface | undefined; reduxRootKey?: string | undefined; reduxRootSe...' has no property 'networkInterface' and no string index signature.
…
Here's the complete tsconfig.json being used, as well:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
It appears like
ts-loader
causes the TS compiler to parse.d.ts
files in a different mode than what the compiler normally does?From a working ts-loader based project (occurs on both webpack 1 & 2), on typescript 2.1:
"strictNullChecks": true"
apollo-client
's constructor.Running
./node_modules/.bin/tsc
directly compiles without complaint. Runningts-loader
results in:Here's the complete
tsconfig.json
being used, as well:Possibly related to microsoft/TypeScript#8681
The text was updated successfully, but these errors were encountered: