Description
When I run npm run-script build
from the root of the project, I get errors.
$ npm run-script build
> vscode-typescript-boilerplate@1.1.0 prebuild C:\workspace\test\ts-boilerplate
> rimraf build
> vscode-typescript-boilerplate@1.1.0 build C:\workspace\test\ts-boilerplate
> tsc -p src/ || true
src/typings/main/definitions/sinon/index.d.ts(436,1): error TS2300: Duplicate identifier 'export='.
src/typings/main/definitions/sinon/index.d.ts(440,1): error TS2300: Duplicate identifier 'export='.
src/typings/main/definitions/sinon/index.d.ts(444,1): error TS2300: Duplicate identifier 'export='.
src/typings/modules/sinon/index.d.ts(436,1): error TS2300: Duplicate identifier 'export='.
src/typings/modules/sinon/index.d.ts(440,1): error TS2300: Duplicate identifier 'export='.
src/typings/modules/sinon/index.d.ts(444,1): error TS2300: Duplicate identifier 'export='.
When I manually run tsc
from src
, I see the same errors.
$ tsc
typings/main/definitions/sinon/index.d.ts(436,1): error TS2300: Duplicate identifier 'export='.
typings/main/definitions/sinon/index.d.ts(440,1): error TS2300: Duplicate identifier 'export='.
typings/main/definitions/sinon/index.d.ts(444,1): error TS2300: Duplicate identifier 'export='.
typings/modules/sinon/index.d.ts(436,1): error TS2300: Duplicate identifier 'export='.
typings/modules/sinon/index.d.ts(440,1): error TS2300: Duplicate identifier 'export='.
typings/modules/sinon/index.d.ts(444,1): error TS2300: Duplicate identifier 'export='.
This boilerplate works for a CommonJS project only?
I was hoping to find an example/boilerplate for an AMD module in TS with .d.ts
being generated and exported via typings
, have you seen such a thing anywhere?
I wrote a Typescript port of Scribe and it builds now and emits .d.ts
etc. - but when I open the generated .d.ts
or try to compile another project referencing it, I get a long list of errors like error TS1038: A 'declare' modifier cannot be used in an already ambient context
for the .d.ts
file.
I'm sorry to ask here, but you seem to know something about this, and I am completely lost - I can't find any documentation or tutorials anywhere explaining how to do this. The closest I've found is your boilerplate project, but like most other examples, this is for CommonJS rather than AMD for the browser. I'm baffled by the fact that the compiler itself seems to generate broken .d.ts
files without complaint, until you have to actually use the generated file. Please, if you can, point me to anything out there that will help me get started?