UNPKG

8.56 kBJSONView Raw
1{
2 "$ref": "#/definitions/TsConfigSchema",
3 "$schema": "http://json-schema.org/draft-07/schema#",
4 "definitions": {
5 "Record<string,\"cjs\"|\"esm\"|\"package\">": {
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 },
31 "type": "object"
32 },
33 "emit": {
34 "default": false,
35 "description": "Emit output files into `.ts-node` directory.",
36 "type": "boolean"
37 },
38 "experimentalReplAwait": {
39 "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.",
40 "type": "boolean"
41 },
42 "files": {
43 "default": false,
44 "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.",
45 "type": "boolean"
46 },
47 "ignore": {
48 "default": [
49 "(?:^|/)node_modules/"
50 ],
51 "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.",
52 "items": {
53 "type": "string"
54 },
55 "type": "array"
56 },
57 "ignoreDiagnostics": {
58 "description": "Ignore TypeScript warnings by diagnostic code.",
59 "items": {
60 "type": [
61 "string",
62 "number"
63 ]
64 },
65 "type": "array"
66 },
67 "logError": {
68 "default": false,
69 "description": "Logs TypeScript errors to stderr instead of throwing exceptions.",
70 "type": "boolean"
71 },
72 "moduleTypes": {
73 "$ref": "#/definitions/Record<string,\"cjs\"|\"esm\"|\"package\">",
74 "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.\nThis is useful because TypeScript files cannot use the .cjs nor .mjs 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."
75 },
76 "preferTsExts": {
77 "default": false,
78 "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`",
79 "type": "boolean"
80 },
81 "pretty": {
82 "default": false,
83 "description": "Use pretty diagnostic formatter.",
84 "type": "boolean"
85 },
86 "require": {
87 "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.",
88 "items": {
89 "type": "string"
90 },
91 "type": "array"
92 },
93 "scope": {
94 "default": false,
95 "description": "Scope compiler to files within `scopeDir`.",
96 "type": "boolean"
97 },
98 "scopeDir": {
99 "default": "First of: `tsconfig.json` \"rootDir\" if specified, directory containing `tsconfig.json`, or cwd if no `tsconfig.json` is loaded.",
100 "type": "string"
101 },
102 "skipIgnore": {
103 "default": false,
104 "description": "Skip ignore check, so that compilation will be attempted for all files with matching extensions.",
105 "type": "boolean"
106 },
107 "transpileOnly": {
108 "default": false,
109 "description": "Use TypeScript's faster `transpileModule`.",
110 "type": "boolean"
111 },
112 "transpiler": {
113 "anyOf": [
114 {
115 "items": [
116 {
117 "type": "string"
118 },
119 {
120 "additionalProperties": true,
121 "properties": {
122 },
123 "type": "object"
124 }
125 ],
126 "maxItems": 2,
127 "minItems": 2,
128 "type": "array"
129 },
130 {
131 "type": "string"
132 }
133 ],
134 "description": "Specify a custom transpiler for use with transpileOnly"
135 },
136 "typeCheck": {
137 "default": true,
138 "description": "**DEPRECATED** Specify type-check is enabled (e.g. `transpileOnly == false`).",
139 "type": "boolean"
140 }
141 },
142 "type": "object"
143 },
144 "TsConfigSchema": {
145 "allOf": [
146 {
147 "$ref": "https://schemastore.azurewebsites.net/schemas/json/tsconfig.json"
148 }
149 ],
150 "description": "tsconfig schema which includes \"ts-node\" options.",
151 "properties": {
152 "ts-node": {
153 "$ref": "#/definitions/TsConfigOptions",
154 "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."
155 }
156 },
157 "type": "object"
158 }
159 }
160}
161