UNPKG

897 BTypeScriptView Raw
1import * as ts from 'typescript';
2type Transformer = ts.TransformerFactory<any> | ts.CustomTransformerFactory;
3type PluginEntry = string | PluginAndOptions;
4interface PluginAndOptions {
5 name: 'string';
6 options: Record<string, any>;
7}
8export interface NestCompilerPlugin {
9 before?: (options?: Record<string, any>, program?: ts.Program) => Transformer;
10 after?: (options?: Record<string, any>, program?: ts.Program) => Transformer;
11 afterDeclarations?: (options?: Record<string, any>, program?: ts.Program) => Transformer;
12}
13export interface MultiNestCompilerPlugins {
14 beforeHooks: Array<(program?: ts.Program) => Transformer>;
15 afterHooks: Array<(program?: ts.Program) => Transformer>;
16 afterDeclarationsHooks: Array<(program?: ts.Program) => Transformer>;
17}
18export declare class PluginsLoader {
19 load(plugins?: PluginEntry[]): MultiNestCompilerPlugins;
20}
21export {};