You can indicate that the file is a module like so:
export {};
declare global {
namespace NodeJS {
interface Global {
config: MyConfigType
}
}
}
More Related Contents:
- Extending TypeScript Global object in node.js
- TypeScript getting error TS2304: cannot find name ‘ require’
- The difference between “require(x)” and “import x”
- Extend Express Request object using Typescript
- Avoid “current URL string parser is deprecated” warning by setting useNewUrlParser to true
- Timeout in async/await
- Can’t run my Node.js Typescript project TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension “.ts” for /app/src/App.ts
- How to NodeJS require inside TypeScript file?
- Module not found: Error can’t resolve ‘child_process’, how to fix?
- What TypeScript configuration produces output closest to Node.js 14 capabilities?
- using process.env in TypeScript
- How to consume npm modules from typescript?
- Importing node-modules with TypeScript
- tsc is not recognized as internal or external command
- Cannot find module ‘angular2/angular2’
- How to run TypeScript files from command line?
- “Type ‘string | string[]’ is not assignable to type ‘string’
- Typescript Error: Property ‘user’ does not exist on type ‘Request’
- TypeScript tsconfig settings for Node.js 12?
- How to force tsc to ignore node_modules folder?
- What is the pwa-node type launch configuration on VSCode?
- What TypeScript configuration produces output closest to Node.js 18 capabilities?
- recommended typescript config for node 8
- One project with multiple package.json files
- Go to the TypeScript source file instead of the type definition file in VS Code
- TypeScript tsconfig settings for Node.js 10?
- How can I solve error gypgyp ERR!ERR! find VSfind VS msvs_version not set from command line or npm config?
- npm WARN npm npm does not support Node.js v9.1.0
- Controlling the heartbeat timeout from the client in socket.io
- Node.js promise request return