|
10 | 10 |
|
11 | 11 | /* Modules */ |
12 | 12 | "rootDirs": [ |
13 | | - /* Specify the root folder within your source files. */ "src", |
| 13 | + /* Specify the root folder within your source files. */ |
| 14 | + "src", |
14 | 15 | "tests" |
15 | 16 | ], |
16 | 17 |
|
|
22 | 23 | "DOM.AsyncIterable", |
23 | 24 | "ESNext", |
24 | 25 | "WebWorker.ImportScripts", |
25 | | - // Additional libs |
| 26 | + // Additional libs that should be supported by latest browsers separate from ESNext |
26 | 27 | "ESNext.Array", |
27 | 28 | "ESNext.AsyncIterable", |
28 | 29 | "ESNext.Symbol", |
|
33 | 34 | "baseUrl": ".", |
34 | 35 | "paths": { |
35 | 36 | "@App/*": ["src/*"], |
36 | | - "@Mapping/*": ["src/mappings/*"] |
| 37 | + "@Mapping/*": ["src/lang/mappings/*"] |
37 | 38 | }, |
38 | 39 |
|
39 | 40 | // import json directly into output |
40 | | - "resolveJsonModule": true /* Enable importing .json files. */, |
| 41 | + "resolveJsonModule": true, |
41 | 42 |
|
42 | | - // we are bundling the project |
| 43 | + // we are bundling the project js into single file for optimized loading |
43 | 44 | "moduleResolution": "Bundler" /* Specify how TypeScript looks up a file from a given module specifier. */, |
| 45 | + // we use esbuild so disable duplicate JS output |
44 | 46 | "noEmit": true /* Disable emitting files from a compilation. */, |
45 | 47 |
|
46 | 48 | // strictness |
|
49 | 51 |
|
50 | 52 | /* Interop Constraints */ |
51 | 53 | "isolatedModules": true /* Ensure that each file can be safely transpiled without relying on other imports. */, |
52 | | - //"verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ |
| 54 | + "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ |
53 | 55 | "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, |
54 | 56 | "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, |
55 | 57 |
|
|
62 | 64 | "noImplicitThis": true /* Enable error reporting when 'this' is given the type 'any'. */, |
63 | 65 | "useUnknownInCatchVariables": true /* Default catch clause variables as 'unknown' instead of 'any'. */, |
64 | 66 | "alwaysStrict": true /* Ensure 'use strict' is always emitted. */, |
| 67 | + |
| 68 | + // allow unused vars for this project, because its more prototyping |
65 | 69 | //"noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ |
66 | 70 | //"noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ |
67 | 71 | "exactOptionalPropertyTypes": true /* Interpret optional property types as written, rather than adding 'undefined'. */, |
68 | 72 | "noImplicitReturns": true /* Enable error reporting for codepaths that do not explicitly return in a function. */, |
69 | 73 | "noFallthroughCasesInSwitch": true /* Enable error reporting for fallthrough cases in switch statements. */, |
| 74 | + |
| 75 | + // this would require index checks for many well-known properties like os.ENV - here it feels too strict than to allow runtime errors |
70 | 76 | //"noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ |
71 | 77 | "noImplicitOverride": true /* Ensure overriding members in derived classes are marked with an override modifier. */, |
72 | 78 | "noPropertyAccessFromIndexSignature": true /* Enforces using indexed accessors for keys declared using an indexed type. */, |
|
0 commit comments