If you're looking to utilize some of the types from the TypeScript module, simply install it using npm (npm install typescript). While there isn't a defined type for the entire tsconfig.json file, with a bit of conditional type magic in TypeScript 2.8, you can extract the type for compiler options. The enums are readily available for direct use.
import * as ts from 'typescript'
type CompilerOptions = typeof ts.parseCommandLine extends (...args: any[])=> infer TResult ?
TResult extends { options: infer TOptions } ? TOptions : never : never;
type TypeAcquisition = typeof ts.parseCommandLine extends (...args: any[])=> infer TResult ?
TResult extends { typeAcquisition?: infer TTypeAcquisition } ? TTypeAcquisition : never : never;
interface TsConfig {
compilerOptions: CompilerOptions;
exclude: string[];
compileOnSave: boolean;
extends: string;
files: string[];
include: string[];
typeAcquisition: TypeAcquisition
}
Note: One benefit is that any modifications made to the CompilerOptions and TypeAcquisition types by the compiler team will automatically reflect in your code upon package updates. However, bear in mind that extracting certain types directly from the compiler API may expose them for potential breaking changes if modified by the compiler team in the future.