-
Notifications
You must be signed in to change notification settings - Fork 26
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
'node_modules/linq-es2015/dist/linq.d.ts' is not a module. #9
Comments
You have to build with TSC 1.18.xx and set target to es2015. For sample look at configuration file |
Ah! Thanks. I'm afraid that in that case this project is not a good fit for me because I also use other libraries that require a more recent TSC. |
I assume the same limitation exists for linq-es5. What is the limitation of this library to upgrade to a higher TSC? Is it a practical or a technical one? |
I thought of a simpler solution: I only load the definition file like My best effort so far:
|
You don't need to add reference to the linq-xx.d.ts file. TSC v1.8 compiler will pick its location from the package.json file. |
When importing, I get the message "Error TS2306 File 'D:/XXX/node_modules/linq-es2015/dist/linq.d.ts' is not a module." I use the import like this: "import {asEnumerable, Range} from 'linq-es2015";"
Furthermore I have a list of messages like "Cannot find name 'iterable'".
I also tried to load the sources with "import {asEnumerable, Range} from "linq-es2015/src/linq.ts";". But then I get a "JsErrorScriptException (0x30001)" without being related to some specific file.
Error found in Visual Studio 2015
The text was updated successfully, but these errors were encountered: