vite-esbuild-typescript-checker
Version:
* Speeds up [TypeScript](https://github.com/Microsoft/TypeScript) type checking * Supports [Vue Single File Component](https://vuejs.org/v2/guide/single-file-components.html) * Displays nice error messages with the [code frame](https://babeljs.io/docs/en/
32 lines (31 loc) • 1.42 kB
TypeScript
import ts from 'typescript';
import { FilesMatch } from './types';
export interface ControlledTypeScriptSystem extends ts.System {
// control watcher
invokeFileCreated(path: string): void;
invokeFileChanged(path: string): void;
invokeFileDeleted(path: string): void;
// control cache
invalidateCache(): void;
// mark these methods as defined - not optional
getFileSize(path: string): number;
watchFile(path: string, callback: ts.FileWatcherCallback, pollingInterval?: number, options?: ts.WatchOptions): ts.FileWatcher;
// watchDirectory(
// path: string,
// callback: ts.DirectoryWatcherCallback,
// recursive?: boolean,
// options?: ts.WatchOptions
// ): ts.FileWatcher;
getModifiedTime(path: string): Date | undefined;
setModifiedTime(path: string, time: Date): void;
deleteFile(path: string): void;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
clearTimeout(timeoutId: any): void;
// detect when all tasks scheduled by `setTimeout` finished
waitForQueued(): Promise<void>;
// keep local version of artifacts to prevent import cycle
setArtifacts(artifacts: FilesMatch): void;
}
export declare const system: ControlledTypeScriptSystem;