-
Notifications
You must be signed in to change notification settings - Fork 981
Expand file tree
/
Copy pathtsconfig.json
More file actions
48 lines (44 loc) · 2.74 KB
/
tsconfig.json
File metadata and controls
48 lines (44 loc) · 2.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// to set it up, you need to add typescript:
// npm i typescript --save-dev
//
// to run the summary check, call:
// npx tsc --checkJs --noEmit
{
// Explicitly specify which files to include in compilation
"files": [
"types/global.d.ts", // Global type declarations for legacy compatibility
"types/common.d.ts", // Common utility functions type definitions
"types/requestProcessor.d.ts", // Request processor type definitions
"types/localization.d.ts", // Localization module type definitions
"types/log.d.ts", // Logging module type definitions
"types/config.d.ts", // Configuration type definitions
"types/pluginManager.d.ts", // Plugin manager type definitions
"types/utils.d.ts", // Utility functions type definitions
"types/batcher.d.ts", // Database batcher type definitions
"types/rights.d.ts", // Rights validation type definitions
"types/events.d.ts", // Events processing type definitions
"types/usage.d.ts", // Usage processing type definitions
"api/utils/localization.js" // Include JS file for type checking
],
"compilerOptions": {
// Language and Environment
"target": "ES2022", // Set the JavaScript language version for emitted JavaScript
"lib": ["ES2022", "DOM"], // Specify a set of bundled library declaration files
// Modules
"moduleResolution": "Node", // Specify how TypeScript looks up a file from a given module specifier
"baseUrl": ".", // Specify the base directory to resolve non-relative module names
"paths": { // Specify a set of entries that re-map imports to additional lookup locations
"@countly/*": ["./api/*"], // Map @countly imports to api directory
"@plugins/*": ["./plugins/*"], // Map @plugins imports to plugins directory
"@frontend/*": ["./frontend/*"] // Map @frontend imports to frontend directory
},
"resolveJsonModule": true, // Enable importing .json files
// JavaScript Support
"allowJs": true, // Allow JavaScript files to be a part of your program
// Interop Constraints
"esModuleInterop": true, // Emit additional JavaScript to ease support for importing CommonJS modules
"forceConsistentCasingInFileNames": true, // Ensure that casing is correct in imports
// Completeness
"typeRoots": ["./types", "./node_modules/@types"] // Specify multiple folders that act like './node_modules/@types'
}
}