Tsconfig
Resolve and parse `tsconfig.json`, replicating TypeScript's behaviour
Install / Use
/learn @TypeStrong/TsconfigREADME
TSConfig
Resolve and parse tsconfig.json, replicating TypeScript's behaviour.
Usage
See the TypeScript docs for information on setting up tsconfig.json.
API
- resolve(cwd: string, path?: string): Promise<string | void> Resolve
tsconfig.json, like TypeScript, allowing a path to be specified and falling back to recursively resolvingtsconfig.jsonupward when no path is specified. - resolveSync(cwd: string, path?: string): string | void Synchronous
resolve. - find(cwd: string): Promise<string | void> Standalone behaviour of recursively resolving
tsconfig.jsonupward. - findSync(cwd: string): string | void Synchronous
find. - load(cwd: string, path?: string): Promise<{ path?: string, config: any }> Resolve, load and parse
tsconfig.json. - loadSync(cwd: string, path?: string): { path?: string, config: any } Synchronous
load. - readFile(filename: string): Promise<any> Read a JSON file as
tsconfig.json(strip BOM, parse JSON and support empty contents). - readFileSync(filename: string): any Synchronous
readFile. - parse(contents: string, filename: string): any Parse file contents as
tsconfig.json(strip BOM, parse JSON and support empty contents).
Contributing
Feel free to open issues for discussion.
# Install dependencies/typings.
npm install
# Run test suite.
npm test
License
MIT License
Related Skills
node-connect
342.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
85.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
342.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
