Typescript, Atom plugin giving duplicate namespace definitions in typescript d.ts files -


typescript supports namespace merging *.ts files. following example uses duplicates namespace in multiple *.d.ts files limit d.ts file size:

file: myroot_common_utils.d.ts    declare namespace myroot {     export namespace common {       export namespace utils {         export function fasttrim(foo: string);       }     } }  file: myroot_common_encoders.d.ts:  declare namespace myroot {    export namespace common {       export namespace encoders {           export function tobase64(foo: string);       }    } } 

resulting in duplicate identifier error using atom typescript plug-in:

 myroot_common_encoders.d.ts duplicate identifier "common". 

is typescript namespace merging limited *.ts files? suggested work around?

is typescript namespace merging limited *.ts files

no. unable reproduce. have more files in compilation context (with duplicates) or other contents in same file causing this.


Comments