Closed
Description
To reproduce:
- Update to Typescript v1.6.2 and reflect-metadata v0.1.1
- Compile this:
/// <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?