@runjuu/ts-migrate-server
Version:
A package that contains the main migration runner and spawns a TSServer process
20 lines (19 loc) • 649 B
TypeScript
import ts from 'typescript';
export declare type Nullable<T> = T | null | undefined;
export interface PluginParams<TPluginOptions> {
options: TPluginOptions;
fileName: string;
rootDir: string;
text: string;
sourceFile: ts.SourceFile;
getLanguageService: () => ts.LanguageService;
}
export declare type PluginResult = string | void;
export interface Plugin<TPluginOptions = unknown> {
name: string;
run(params: PluginParams<TPluginOptions>): Promise<PluginResult> | PluginResult;
}
export declare type PluginWithOptions<TPluginOptions = unknown> = {
plugin: Plugin<TPluginOptions>;
options: TPluginOptions;
};