Skip to content

Instantly share code, notes, and snippets.

@webstrand
Created May 19, 2020 22:08
Show Gist options
  • Select an option

  • Save webstrand/68e33abe8073a1e6f56d25b722ea0db9 to your computer and use it in GitHub Desktop.

Select an option

Save webstrand/68e33abe8073a1e6f56d25b722ea0db9 to your computer and use it in GitHub Desktop.
Typings for tsconfig.json 3.9
type BuildOptions = {
watch?: boolean;
preserveWatchOutput?: boolean;
listFiles?: boolean;
listEmittedFiles?: boolean;
pretty?: boolean;
traceResolution?: boolean;
diagnostics?: boolean;
extendedDiagnostics?: boolean;
generateCpuProfile?: string;
incremental?: boolean;
assumeChangesOnlyAffectDirectDependencies?: boolean;
locale?: string;
};
type CompilerOptions = BuildOptions & {
target?:
| "es3" | "es5" | "es6" | "es2015" | "es2016" | "es2017" | "es2018"
| "es2019" | "es2020" | "esnext"
module?:
| "none" | "commonjs" | "amd" | "system" | "umd" | "es6" | "es2015"
| "es2020" | "esnext"
lib?: (
| "es5" | "es6" | "es2015" | "es7" | "es2016" | "es2017" | "es2018"
| "es2019" | "es2020" | "esnext" | "dom" | "dom.iterable" | "webworker"
| "webworker.importscripts" | "scripthost" | "es2015.core"
| "es2015.collection" | "es2015.generator" | "es2015.iterable"
| "es2015.promise" | "es2015.proxy" | "es2015.reflect" | "es2015.symbol"
| "es2015.symbol.wellknown" | "es2016.array.include" | "es2017.object"
| "es2017.sharedmemory" | "es2017.string" | "es2017.intl"
| "es2017.typedarrays" | "es2018.asyncgenerator"
| "es2018.asynciterable" | "es2018.intl" | "es2018.promise"
| "es2018.regexp" | "es2019.array" | "es2019.object" | "es2019.string"
| "es2019.symbol" | "es2020.bigint" | "es2020.promise" | "es2020.string"
| "es2020.symbol.wellknown" | "esnext.array" | "esnext.symbol"
| "esnext.asynciterable" | " esnext.intl" | "esnext.bigint"
| "esnext.string" | "esnext.promise"
)[];
allowJs?: boolean
checkJs?: boolean
jsx?: "preserve" | "react-native" | "react"
declaration?: boolean
declarationMap?: boolean
emitDeclarationOnly?: boolean
sourceMap?: boolean
outFile?: string
outDir?: string
rootDir?: string
composite?: boolean
tsBuildInfoFile?: string
removeComments?: boolean
noEmit?: boolean
importHelpers?: boolean
importsNotUsedAsValues?: "remove" | "preserve" | "error"
downlevelIteration?: boolean
isolatedModules?: boolean
strict?: boolean
noImplicitAny?: boolean
strictNullChecks?: boolean
strictFunctionTypes?: boolean
strictBindCallApply?: boolean
strictPropertyInitialization?: boolean
noImplicitThis?: boolean
alwaysStrict?: boolean
noUnusedLocals?: boolean
noUnusedParameters?: boolean
noImplicitReturns?: boolean
noFallthroughCasesInSwitch?: boolean
moduleResolution?: "node" | "classic"
baseUrl?: string
paths?: { [key: string]: string }
rootDirs?: string[]
typeRoots?: string[]
types?: string[]
allowSyntheticDefaultImports?: boolean
esModuleInterop?: boolean
preserveSymlinks?: boolean
allowUmdGlobalAccess?: boolean
sourceRoot?: string
mapRoot?: string
inlineSourceMap?: boolean
inlineSources?: boolean
experimentalDecorators?: boolean
emitDecoratorMetadata?: boolean
jsxFactory?: string
resolveJsonModule?: boolean
out?: string
reactNamespace?: string
skipDefaultLibCheck?: boolean
charset?: string
emitBOM?: boolean
newLine?: "crlf" | "lf"
noErrorTruncation?: boolean
noLib?: boolean
noResolve?: boolean
stripInternal?: boolean
disableSizeLimit?: boolean
disableSourceOfProjectReferenceRedirect?: boolean
disableSolutionSearching?: boolean
noImplicitUseStrict?: boolean
noEmitHelpers?: boolean
noEmitOnError?: boolean
preserveConstEnums?: boolean
declarationDir?: string
skipLibCheck?: boolean
allowUnusedLabels?: boolean
allowUnreachableCode?: boolean
suppressExcessPropertyErrors?: boolean
suppressImplicitAnyIndexErrors?: boolean
forceConsistentCasingInFileNames?: boolean
maxNodeModuleJsDepth?: number
noStrictGenericChecks?: boolean
useDefineForClassFields?: boolean
keyofStringsOnly?: boolean
plugins?: ({ name: string; } & { [_ in string]?: unknown })[]
};
type WatchOptions = {
watchFile?:
| "fixedpollinginterval" | "prioritypollinginterval"
| "dynamicprioritypolling" | "usefsevents"
| "usefseventsonparentdirectory";
watchDirectory?:
| "usefsevents" | "fixedpollinginterval"
| "dynamicprioritypolling";
fallbackPolling?:
| "fixedinterval"
| "priorityinterval"
| "dynamicpriority";
synchronousWatchDirectory?: boolean;
}
type TypingOptions = {
enableAutoDiscovery?: boolean;
enable?: boolean;
include?: string[];
exclude?: string[];
};
type TSConfig = {
compilerOptions?: CompilerOptions;
watchOptions?: WatchOptions;
typingOptions?: TypingOptions;
typeAcquisition?: TypingOptions;
extends?: string;
references?: {
path: string;
prepend?: boolean;
}[];
files?: string[];
include?: string[];
exclude?: string[];
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment