@mnrendra/types-tsconfig
v1.1.0
Published
TSConfig interface to validate tsconfig.json value.
Downloads
64
Maintainers
Readme
@mnrendra/types-tsconfig
tsconfig.json
interface extended from the official and unofficial fields.
Install
npm i -D @mnrendra/types-tsconfig
Usage
import type { TSConfig } from '@mnrendra/types-tsconfig'
import { readFileSync } from 'fs'
import { resolve } from 'path'
import { cwd } from 'process'
import * as JSON5 from 'json5'
const { compilerOptions }: TSConfig = JSON5.parse(readFileSync(resolve(cwd(), 'tsconfig.json'), 'utf-8'))
console.log(compilerOptions)
Types
import type {
TSConfig // `tsconfig.json` interface extended from the official and unofficial fields.
// Interfaces
BuildOptions,
CompileOnSave,
CompilerOptions,
BaseURL,
Paths,
Exclude,
Extends,
Files,
Include,
MDX,
References,
TSNode,
WatchOptions,
TypeAcquisition
} from '@mnrendra/types-tsconfig'