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

Cannot find name 'Iterable' #121

Closed
Cmacu opened this issue Oct 15, 2019 · 2 comments
Closed

Cannot find name 'Iterable' #121

Cmacu opened this issue Oct 15, 2019 · 2 comments

Comments

@Cmacu
Copy link

Cmacu commented Oct 15, 2019

Using the tsconfing.json provided in the documentation:

{
  "compilerOptions": {
    "module": "amd",
    "target": "es5",
    "moduleResolution": "node",
    "sourceMap": false,
    "newLine": "LF",
    "experimentalDecorators": true,
    "noImplicitUseStrict": true,
    "baseUrl": ".",
    "lib": ["es5", "es2015.promise", "dom"],
    "paths": {
      "N": ["node_modules/@hitc/netsuite-types/N"],
      "N/*": ["node_modules/@hitc/netsuite-types/N/*"]
    }
  },
  "exclude": ["node_modules"]
}

I get the following error:

node_modules/typescript/lib/lib.es2015.promise.d.ts(129,21): error TS2304: Cannot find name 'Iterable'.

This is resolved after I add 'es6' to the 'lib' list:

...
"lib": ["es5", "es6", "es2015.promise", "dom"],
...

I am not sure, if this would be fine with SuiteScript. I will update if I run into some issues.

@jeffreymkabot
Copy link
Contributor

This is from a bug introduced in recent versions of TS

Workaround is to add es2015.iterable to lib

microsoft/TypeScript#31722

@Cmacu
Copy link
Author

Cmacu commented Oct 16, 2019

This resolved it. Thanks

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