UNPKG

@nestjs/cli

Version:

The Nest CLI: create NestJS applications, generate modules, controllers and CRUD resources, and build, run and watch projects and monorepos.

32 lines (31 loc) • 1.24 kB
import * as ts from 'typescript'; import { ReadonlyVisitor } from '../interfaces/readonly-visitor.interface.js'; type Transformer = ts.TransformerFactory<any> | ts.CustomTransformerFactory; type PluginEntry = string | PluginAndOptions; type PluginOptions = Record<string, any>; interface PluginAndOptions { name: string; options: PluginOptions; } export interface NestCompilerPlugin { before?: (options?: PluginOptions, program?: ts.Program) => Transformer; after?: (options?: PluginOptions, program?: ts.Program) => Transformer; afterDeclarations?: (options?: PluginOptions, program?: ts.Program) => Transformer; ReadonlyVisitor?: { new (options: PluginOptions): ReadonlyVisitor; }; } export interface MultiNestCompilerPlugins { beforeHooks: Array<(program?: ts.Program) => Transformer>; afterHooks: Array<(program?: ts.Program) => Transformer>; afterDeclarationsHooks: Array<(program?: ts.Program) => Transformer>; readonlyVisitors: Array<ReadonlyVisitor>; } export declare class PluginsLoader { load(plugins?: PluginEntry[], extras?: { pathToSource?: string; }): MultiNestCompilerPlugins; private resolvePluginReferences; private resolvePluginPath; } export {};