I use the typescript definition file for breeze in my project (breeze.d.ts). When I compile my project, I got an error line 216:
'declare' modifier not allowed for code already in an ambient context.
If I simply delete declare
it compiles successfully.
Does anyone experiencing the same problem?
Thanks.
It happens when you are inside a declare section e.g.:
declare module Mod{
declare var x;
}
Fix is the remove the inner declare keyword:
declare module Mod{
var x;
}
So: The original typescript definition file you have is incorrect for the latest version of typescript.
I got this error because I added ';' at the end of lines inside a declare module block:
declare module SomeModule {
export function someFunction():any; <--- remove the ';'
export function anotherFunc():any
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With