UNPKG

st-bundle

Version:

CLI for watching and bundling SpringType projects.

68 lines (67 loc) 2.71 kB
import { CallExpression, ExportAssignment, ExportDeclaration, FunctionDeclaration, ImportDeclaration } from 'ts-morph'; import { ProductionModule } from '../ProductionModule'; import { ExportReference } from './ExportReference'; import { ImportVariable } from './ImportVariable'; export declare enum ESLinkType { ExportDeclaration = 0, ExportAssignment = 1, ImportDeclaration = 2, ObjectDeclaration = 3 } export declare class ESLink { productionModule: ProductionModule; type: ESLinkType; /** * fromSource * import .. from "./source" * export .. from "./source" * * @type {string} * @memberof ESLink */ fromSource: string; fromSourceTarget: ProductionModule; isDynamicImport: boolean; dynamicImportTarget: ProductionModule; dynamicImportCallExpression: CallExpression; imports: Array<ImportVariable>; exports: Array<ExportReference>; private importDeclarationNode; private exportDeclarationNode; exportAssignmentNode: ExportAssignment; exportObjectDeclarationNode: FunctionDeclaration; constructor(productionModule: ProductionModule); getDependencies(): ProductionModule[]; /** * importDeclaration ******************************************************** * * @param {ImportDeclaration} node * @memberof ESLink */ createImportDeclaration(node: ImportDeclaration): void; private parseNamedImports; /** * Export assignemnt ****************************************************************** * * @param {ExportAssignment} node * @memberof ESLink */ createExportAssignment(node: ExportAssignment): void; /** * ExportDeclaration ****************************************************************** * * @param {ExportDeclaration} node * @memberof ESLink */ createExportDeclaration(node: ExportDeclaration): void; private parseExports; private getLocalDeclaration; createDynamicImport(node: CallExpression): void; createExportObjectDeclaration(node: FunctionDeclaration): void; toJSON(): any; } export declare function createImportDeclaration(productionModule: ProductionModule, node: ImportDeclaration): ESLink; export declare function createDynamicImportDeclaration(productionModule: ProductionModule, node: CallExpression): ESLink; export declare function createExportAssignment(productionModule: ProductionModule, node: ExportAssignment): ESLink; export declare function createExportDeclaration(productionModule: ProductionModule, node: ExportDeclaration): ESLink; export declare function createExportObjectDeclaration(productionModule: ProductionModule, node: any): ESLink;