Extending TypeScript Global object in node.js. The TypeScript compiler doesn’t like this because the Global type has no object named myConfig. You probably have something like vendor.d.ts:
1 2 3 4 5 6 7 8 | // some import // AND/OR some export declare module NodeJS { interface Global { spotConfig: any } } |
Your file needs to be clean of any root level import or exports. That would turn the file into a module and disconnect it from the global type declaration namespace.
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.