Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tsc compile error #44

Open
wujianv5 opened this issue Nov 19, 2019 · 1 comment
Open

tsc compile error #44

wujianv5 opened this issue Nov 19, 2019 · 1 comment

Comments

@wujianv5
Copy link

wujianv5 commented Nov 19, 2019

When I run tsc, the compiler tells:

xxx/AppData/Roaming/npm/node_modules/typescript/lib/lib.es2015.iterable.d.ts:41:6 - error TS2300: Duplicate identifier 'IteratorResult'.

41 type IteratorResult<T, TReturn = any> = IteratorYieldResult | IteratorReturnResult;
~~~~~~~~~~~~~~

node_modules/@types/node/index.d.ts:165:11
165 interface IteratorResult { }
~~~~~~~~~~~~~~
'IteratorResult' was also declared here.

And my tsconfig.json is:

{
"exclude": [
"node_modules/@types/node/index.d.ts"
],
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"lib": ["es6"],
"strict": true,
"esModuleInterop": true
}
}

Typescript version is 3.7.2

The "exclude" in tsconfig.json makes no difference.

@weekens
Copy link
Contributor

weekens commented Nov 26, 2019

Hi @wujianv5 ! You should use the version of TypeScript that is configured in package.json, it's the only one that is being tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants