UNPKG

1.52 kBTypeScriptView Raw
1import * as ts from 'typescript';
2declare module 'typescript' {
3 interface Symbol {
4 id?: number;
5 parent?: ts.Symbol;
6 }
7 interface Node {
8 symbol?: ts.Symbol;
9 localSymbol?: ts.Symbol;
10 }
11}
12export declare function createCompilerDiagnostic(message: ts.DiagnosticMessage, ...args: (string | number)[]): ts.Diagnostic;
13export declare function createCompilerDiagnostic(message: ts.DiagnosticMessage): ts.Diagnostic;
14export declare const optionDeclarations: CommandLineOption[];
15export interface CommandLineOptionBase {
16 name: string;
17 type: 'string' | 'number' | 'boolean' | 'object' | 'list' | Map<number | string, any>;
18 isFilePath?: boolean;
19 shortName?: string;
20 description?: ts.DiagnosticMessage;
21 paramType?: ts.DiagnosticMessage;
22 experimental?: boolean;
23 isTSConfigOnly?: boolean;
24}
25export interface CommandLineOptionOfPrimitiveType extends CommandLineOptionBase {
26 type: 'string' | 'number' | 'boolean';
27}
28export interface CommandLineOptionOfCustomType extends CommandLineOptionBase {
29 type: Map<number | string, any>;
30}
31export interface TsConfigOnlyOption extends CommandLineOptionBase {
32 type: 'object';
33}
34export interface CommandLineOptionOfListType extends CommandLineOptionBase {
35 type: 'list';
36 element: CommandLineOptionOfCustomType | CommandLineOptionOfPrimitiveType;
37}
38export declare type CommandLineOption = CommandLineOptionOfCustomType | CommandLineOptionOfPrimitiveType | TsConfigOnlyOption | CommandLineOptionOfListType;