import * as ts from '@schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript'; import { Change } from '@schematics/angular/utility/change'; export declare type VariableType = 'const' | 'let' | 'var' | 'function'; export interface IVariableDeclaration { name: string; content: string; type: VariableType; model?: string; modelPath?: string; skipModelImport?: boolean; isExport?: boolean; } export interface IFunctionDeclaration { name: string; params?: IFunctionArguments[]; content: string; returns: IFunctionArguments; modelPath?: string; isExport?: boolean; externalImports?: { name: string; path: string; }[]; } interface IFunctionArguments { model: string; importPath?: string; } export declare function createVariable({ isExport, type, name, content, model }: IVariableDeclaration): string; export declare function createFunction({ isExport, name, content, params, returns }: IFunctionDeclaration): string; /** * @param path path to file * @param pos start position * @param options variable data * @param source file source */ export declare function addVariableDeclaration(path: string, pos: number, options: IVariableDeclaration, source?: ts.SourceFile): Change[]; /** * @param source typescript file context * @param identifier variable name of declaration * const variable = []; * identifier is "variable" * @returns node instance */ export declare function getVariableDeclaration(source: ts.SourceFile, identifier: string, isArray?: boolean): ts.Node[]; export declare function getFunctionDeclaration(source: ts.SourceFile, identifier: string): ts.Node | undefined; export declare function addFunctionDeclaration(path: string, pos: number, options: IFunctionDeclaration, source?: ts.SourceFile): Change[]; export {};