-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsconfig.json
More file actions
43 lines (43 loc) · 2 KB
/
tsconfig.json
File metadata and controls
43 lines (43 loc) · 2 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
{
// TypeScript configuration for this Office Scripts project and its tests.
//
// - "strictNullChecks" is set to false because Office Scripts APIs often return 'undefined'
// where TypeScript expects 'null'. Enabling strict null checks would cause excessive
// type errors or require verbose code, which is impractical for this context.
//
// - "mocks" and "wrappers" directories are included to support local unit testing and
// development outside Excel Online.
//
// - "typeRoots" includes both custom Office Scripts typings and standard @types packages.
// This ensures IntelliSense and type checking works for both Office Scripts mocks and
// any Node.js or test framework typings.
//
// - All strict type checks except strictNullChecks are enabled for code quality.
// - "include" covers all source, test, mock, and type definition files.
// - "exclude" omits build and dependency artifacts.
"compilerOptions": {
"target": "es2019", // Output ES2019-compatible JS (irrelevant for Office Scripts, but required for Node)
"module": "commonjs", // Module system for Node.js compatibility
"declaration": true, // Generate .d.ts type declaration files
"outDir": "dist", // Output directory for build artifacts
"rootDir": ".", // Project root as rootDir to capture all code
"strict": true, // Enable all strict type-checking options
"strictNullChecks": false, // Disable strict null/undefined checks (see note above)
"esModuleInterop": true, // Enable ES module/CommonJS import compatibility
"typeRoots": [
"./types", // Custom Office Scripts and project type definitions
"./node_modules/@types" // Standard type definitions from npm packages
]
},
"include": [
"src/**/*",
"test/**/*",
"types/**/*.d.ts",
"wrappers/**/*.ts",
"mocks/**/*.ts"
],
"exclude": [
"dist",
"node_modules"
]
}