UNPKG

10 kBJSONView Raw
1{
2 "$ref": "#/definitions/TsConfigSchema",
3 "$schema": "http://json-schema.org/draft-07/schema#",
4 "definitions": {
5 "ModuleTypes": {
6 "type": "object"
7 },
8 "TsConfigOptions": {
9 "description": "Must be an interface to support `typescript-json-schema`.",
10 "properties": {
11 "compiler": {
12 "default": "typescript",
13 "description": "Specify a custom TypeScript compiler.",
14 "type": "string"
15 },
16 "compilerHost": {
17 "default": false,
18 "description": "Use TypeScript's compiler host API instead of the language service API.",
19 "type": "boolean"
20 },
21 "compilerOptions": {
22 "additionalProperties": true,
23 "allOf": [
24 {
25 "$ref": "https://schemastore.azurewebsites.net/schemas/json/tsconfig.json#definitions/compilerOptionsDefinition/properties/compilerOptions"
26 }
27 ],
28 "description": "JSON object to merge with TypeScript `compilerOptions`.",
29 "properties": {},
30 "type": "object"
31 },
32 "emit": {
33 "default": false,
34 "description": "Emit output files into `.ts-node` directory.",
35 "type": "boolean"
36 },
37 "esm": {
38 "description": "Enable native ESM support.\n\nFor details, see https://typestrong.org/ts-node/docs/imports#native-ecmascript-modules",
39 "type": "boolean"
40 },
41 "experimentalReplAwait": {
42 "description": "Allows the usage of top level await in REPL.\n\nUses node's implementation which accomplishes this with an AST syntax transformation.\n\nEnabled by default when tsconfig target is es2018 or above. Set to false to disable.\n\n**Note**: setting to `true` when tsconfig target is too low will throw an Error. Leave as `undefined`\nto get default, automatic behavior.",
43 "type": "boolean"
44 },
45 "experimentalResolver": {
46 "description": "Enable experimental features that re-map imports and require calls to support:\n`baseUrl`, `paths`, `rootDirs`, `.js` to `.ts` file extension mappings,\n`outDir` to `rootDir` mappings for composite projects and monorepos.\n\nFor details, see https://github.com/TypeStrong/ts-node/issues/1514",
47 "type": "boolean"
48 },
49 "experimentalSpecifierResolution": {
50 "description": "Like node's `--experimental-specifier-resolution`, , but can also be set in your `tsconfig.json` for convenience.\n\nFor details, see https://nodejs.org/dist/latest-v18.x/docs/api/esm.html#customizing-esm-specifier-resolution-algorithm",
51 "enum": [
52 "explicit",
53 "node"
54 ],
55 "type": "string"
56 },
57 "files": {
58 "default": false,
59 "description": "Load \"files\" and \"include\" from `tsconfig.json` on startup.\n\nDefault is to override `tsconfig.json` \"files\" and \"include\" to only include the entrypoint script.",
60 "type": "boolean"
61 },
62 "ignore": {
63 "default": [
64 "(?:^|/)node_modules/"
65 ],
66 "description": "Paths which should not be compiled.\n\nEach string in the array is converted to a regular expression via `new RegExp()` and tested against source paths prior to compilation.\n\nSource paths are normalized to posix-style separators, relative to the directory containing `tsconfig.json` or to cwd if no `tsconfig.json` is loaded.\n\nDefault is to ignore all node_modules subdirectories.",
67 "items": {
68 "type": "string"
69 },
70 "type": "array"
71 },
72 "ignoreDiagnostics": {
73 "description": "Ignore TypeScript warnings by diagnostic code.",
74 "items": {
75 "type": [
76 "string",
77 "number"
78 ]
79 },
80 "type": "array"
81 },
82 "logError": {
83 "default": false,
84 "description": "Logs TypeScript errors to stderr instead of throwing exceptions.",
85 "type": "boolean"
86 },
87 "moduleTypes": {
88 "$ref": "#/definitions/ModuleTypes",
89 "description": "Override certain paths to be compiled and executed as CommonJS or ECMAScript modules.\nWhen overridden, the tsconfig \"module\" and package.json \"type\" fields are overridden, and\nthe file extension is ignored.\nThis is useful if you cannot use .mts, .cts, .mjs, or .cjs file extensions;\nit achieves the same effect.\n\nEach key is a glob pattern following the same rules as tsconfig's \"include\" array.\nWhen multiple patterns match the same file, the last pattern takes precedence.\n\n`cjs` overrides matches files to compile and execute as CommonJS.\n`esm` overrides matches files to compile and execute as native ECMAScript modules.\n`package` overrides either of the above to default behavior, which obeys package.json \"type\" and\ntsconfig.json \"module\" options."
90 },
91 "preferTsExts": {
92 "default": false,
93 "description": "Re-order file extensions so that TypeScript imports are preferred.\n\nFor example, when both `index.js` and `index.ts` exist, enabling this option causes `require('./index')` to resolve to `index.ts` instead of `index.js`",
94 "type": "boolean"
95 },
96 "pretty": {
97 "default": false,
98 "description": "Use pretty diagnostic formatter.",
99 "type": "boolean"
100 },
101 "require": {
102 "description": "Modules to require, like node's `--require` flag.\n\nIf specified in `tsconfig.json`, the modules will be resolved relative to the `tsconfig.json` file.\n\nIf specified programmatically, each input string should be pre-resolved to an absolute path for\nbest results.",
103 "items": {
104 "type": "string"
105 },
106 "type": "array"
107 },
108 "scope": {
109 "default": false,
110 "description": "Scope compiler to files within `scopeDir`.",
111 "type": "boolean"
112 },
113 "scopeDir": {
114 "default": "First of: `tsconfig.json` \"rootDir\" if specified, directory containing `tsconfig.json`, or cwd if no `tsconfig.json` is loaded.",
115 "type": "string"
116 },
117 "skipIgnore": {
118 "default": false,
119 "description": "Skip ignore check, so that compilation will be attempted for all files with matching extensions.",
120 "type": "boolean"
121 },
122 "swc": {
123 "description": "Transpile with swc instead of the TypeScript compiler, and skip typechecking.\n\nEquivalent to setting both `transpileOnly: true` and `transpiler: 'ts-node/transpilers/swc'`\n\nFor complete instructions: https://typestrong.org/ts-node/docs/transpilers",
124 "type": "boolean"
125 },
126 "transpileOnly": {
127 "default": false,
128 "description": "Use TypeScript's faster `transpileModule`.",
129 "type": "boolean"
130 },
131 "transpiler": {
132 "anyOf": [
133 {
134 "items": [
135 {
136 "type": "string"
137 },
138 {
139 "additionalProperties": true,
140 "properties": {},
141 "type": "object"
142 }
143 ],
144 "maxItems": 2,
145 "minItems": 2,
146 "type": "array"
147 },
148 {
149 "type": "string"
150 }
151 ],
152 "description": "Specify a custom transpiler for use with transpileOnly"
153 },
154 "typeCheck": {
155 "default": true,
156 "description": "**DEPRECATED** Specify type-check is enabled (e.g. `transpileOnly == false`).",
157 "type": "boolean"
158 }
159 },
160 "type": "object"
161 },
162 "TsConfigSchema": {
163 "allOf": [
164 {
165 "$ref": "https://schemastore.azurewebsites.net/schemas/json/tsconfig.json"
166 }
167 ],
168 "description": "tsconfig schema which includes \"ts-node\" options.",
169 "properties": {
170 "ts-node": {
171 "$ref": "#/definitions/TsConfigOptions",
172 "description": "ts-node options. See also: https://typestrong.org/ts-node/docs/configuration\n\nts-node offers TypeScript execution and REPL for node.js, with source map support."
173 }
174 },
175 "type": "object"
176 }
177 }
178}
179