id = "tsc" name = "TypeScript compiler (tsc)" description = "The TypeScript compiler, which type-checks and compiles TypeScript to JavaScript." homepage = "https://www.typescriptlang.org" executables = ["tsc"] [commands] format = 1 label = "Compile TypeScript" description = "Type-check or compile a project or files. Only common compiler flags are here; other options belong in tsconfig.json. Note a project cannot be combined with input files." quality = "ai-draft" base = "fig:tsc" parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/tsc.ts" license = "MIT" [[commands.field]] id = "files" label = "Input files" description = "Leave empty to use the project config; cannot be combined with --project." type = "path" position = 0 multiple = true path = { kind = "file", role = "input" } sources = ["fig"] [[commands.field]] id = "project" label = "Project (tsconfig)" type = "path" option = ["--project"] path = { kind = "any", role = "input" } sources = ["fig"] [[commands.field]] id = "no_emit" label = "Type-check only" type = "boolean" option = ["--noEmit"] sources = ["fig"] [[commands.field]] id = "watch" label = "Watch mode" type = "boolean" option = ["--watch"] sources = ["fig"] [[commands.field]] id = "init" label = "Create tsconfig.json" type = "boolean" option = ["--init"] sources = ["fig"] [[commands.field]] id = "target" label = "Target" type = "string" option = ["--target"] suggestions = [{ value = "ES5", label = "ES5" }, { value = "ES2015", label = "ES2015" }, { value = "ES2020", label = "ES2020" }, { value = "ESNext", label = "ESNext" }] sources = ["fig"] [[commands.field]] id = "module" label = "Module" type = "string" option = ["--module"] suggestions = [{ value = "CommonJS", label = "CommonJS" }, { value = "ESNext", label = "ESNext" }, { value = "UMD", label = "UMD" }, { value = "AMD", label = "AMD" }] sources = ["fig"] [[commands.field]] id = "out_dir" label = "Output directory" type = "path" option = ["--outDir"] path = { kind = "directory", role = "output" } sources = ["fig"] [[commands.field]] id = "strict" label = "Strict checks" type = "boolean" option = ["--strict"] sources = ["fig"] [[commands.field]] id = "declaration" label = "Emit .d.ts" type = "boolean" option = ["--declaration"] sources = ["fig"] [[commands.field]] id = "source_map" label = "Source maps" type = "boolean" option = ["--sourceMap"] sources = ["fig"] [[commands.field]] id = "skip_lib_check" label = "Skip lib check" type = "boolean" option = ["--skipLibCheck"] sources = ["fig"] [[commands.task]] id = "check" label = "Type-check project" set = { no_emit = [true] } fields = ["project", "no_emit", "skip_lib_check"] required = [] [[commands.task]] id = "build" label = "Compile project" fields = ["project", "out_dir", "source_map", "declaration"] required = [] [[commands.task]] id = "watch" label = "Watch project" set = { watch = [true] } fields = ["project", "watch", "no_emit"] required = [] [[commands.group]] id = "basic" label = "Basic" fields = ["files", "project", "no_emit", "watch", "strict"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["init", "target", "module", "out_dir", "declaration", "source_map", "skip_lib_check"]