@tsbb/typescript
Version:
TSBB is a zero-config CLI that helps you develop, test, and publish modern TypeScript project.
22 lines (21 loc) • 1.02 kB
TypeScript
import ts from 'typescript';
export declare const __filename: string;
export declare const __dirname: string;
/**
*
* @param paths `[ 'src/index.jsx', 'test/sum.js' ]`
* @returns ['src', 'test']
*/
export declare const getRootsFolderName: (paths?: string[]) => string[];
export declare const getExt: (extname: string) => string;
export declare const getEmojiIcon: (fileName: string) => string;
export declare const writeFile: (fileName: string, data: string, writeByteOrderMark?: boolean) => void;
export declare const getSourceFile: ts.CompilerHost['getSourceFile'];
export declare const reportDiagnostic: (diagnostic: ts.Diagnostic) => void;
export declare const onWatchStatusChange: (diagnostic: ts.Diagnostic, newLine: string, options: ts.CompilerOptions, errorCount?: number) => void;
/**
* @param sourceFilePath `src/demo/index.ts`
* @param rootDirsRelative `['src', 'test']`
* @returns `demo/index.ts`
*/
export declare const getSourceFilePath: (sourceFilePath: string, rootDirsRelative: string[]) => string;