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

Error when setting compilerOptions.module and compilerOptions.target to "esNext", "es2020" or similar #31

Open
sjordan1975 opened this issue Jun 4, 2020 · 0 comments

Comments

@sjordan1975
Copy link

Error when setting compilerOptions.module and compilerOptions.target to "esNext", "es2020" or similar.

Ex. According to https://www.typescriptlang.org/docs/handbook/compiler-options.html, "esNext" would be a valid value for both module and target

Example tsconfig.json:

{
    "compilerOptions": {
        "module": "esNext",
        "target": "esNext",
    },
    "files": [
        "./lib/myCode.ts",
        "./node_modules/marklogic-typescript-definitions/ts/index.d.ts"
    ]
}

Error similar to the following

$ tsc
../../../.nvm/versions/node/v14.4.0/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts:41:6 - error TS2300: Duplicate identifier 'IteratorResult'.

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

  node_modules/marklogic-typescript-definitions/ts/types.d.ts:192:11
    192 interface IteratorResult<T> {
                  ~~~~~~~~~~~~~~
    'IteratorResult' was also declared here.

node_modules/marklogic-typescript-definitions/ts/types.d.ts:192:11 - error TS2300: Duplicate identifier 'IteratorResult'.

192 interface IteratorResult<T> {
              ~~~~~~~~~~~~~~

  ../../../.nvm/versions/node/v14.4.0/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts:41:6
    41 type IteratorResult<T, TReturn = any> = IteratorYieldResult<T> | IteratorReturnResult<TReturn>;
            ~~~~~~~~~~~~~~
    'IteratorResult' was also declared here.


Found 2 errors.
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

1 participant