We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
To reproduce:
/// <reference path="node_modules/reflect-metadata/reflect-metadata.d.ts" /> import 'reflect-metadata';
Expected: compiles just fine Actual: compile error:
index.ts(3,8): error TS2306: File 'node_modules/reflect-metadata/reflect-metadata.d.ts' is not a module.
I created a git repo to demonstrate:
git clone https://github.com/mattyork/TypescriptReflectMetadataBug.git cd TypescriptReflectMetadataBug npm install ./node_modules/.bin/tsc
If I delete the typings field in package.json this error goes away. What is this typings field for and why is it causing this bug?
typings
The text was updated successfully, but these errors were encountered:
we either need to remove the typings field, or make it an empty module, e.g.
interface reflect_metadata {} export = reflect_metadata;
Sorry, something went wrong.
I'll have to remove "typings", as making it an external module will prevent the library from introducing globals.
I removed "typings" from the reflect-metadata polyfill and published a new version to npm.
/// <reference path="node_modules/reflect-metadata/reflect-metadata.d.ts" />
What is the way to modify tsconfig.json to accomplish the same effect?
tsconfig.json
Include the file in the "files": [] property.
"files": []
rbuckton
No branches or pull requests
To reproduce:
Expected: compiles just fine
Actual: compile error:
I created a git repo to demonstrate:
If I delete the
typings
field in package.json this error goes away. What is thistypings
field for and why is it causing this bug?The text was updated successfully, but these errors were encountered: