import { SourceFile, VariableDeclarationKind, WriterFunction } from "ts-morph"; import { ISharedTypeStructure } from "@ts-morpher/types"; /** * update variable export identifier. * @param source SourceFile * @param identifier previous identifier * @param updatedIdentifier updated identifier * @param apply save source file */ export declare function updateVariableExportIdentifier(source: SourceFile, identifier: string, updatedIdentifier: string, apply?: boolean): void; /** * update variable export declaration kind. * @param source SourceFile * @param identifier previous identifier * @param declarationKind updated declaration kind * @param apply save source file */ export declare function updateVariableExportKind(source: SourceFile, identifier: string, declarationKind: VariableDeclarationKind, apply?: boolean): void; /** * Basic variable declaration structure. */ export interface IBaseDeclarationStructure { name: string; hasExclamationToken?: boolean; initializer?: string | WriterFunction; type?: string | WriterFunction; } /** * Basic variable structure. */ export interface IBaseVariableExportStructure { declarationKind?: VariableDeclarationKind; /** * {@link IBaseDeclarationStructure} */ declarations?: IBaseDeclarationStructure[]; isExported?: boolean; isDefaultExport?: boolean; } /** * update base structure of variable export. * @param source SourceFile * @param identifier variable identifier * @param structure {@link IBaseVariableExportStructure} updated structure * @param apply save source file * @returns void */ export declare function updateVariableExportStructure(source: SourceFile, identifier: string, structure: IBaseVariableExportStructure, apply?: boolean): void; /** * Basic type alias structure */ export interface IBaseTypeAliasStructure extends ISharedTypeStructure { type?: string | WriterFunction; } /** * update base structure of type alias export. * @param source SourceFile * @param identifier type alias identifier * @param structure {@link IBaseTypeAliasStructure} updated structure * @param apply save source file * @returns */ export declare function updateTypeExportStructure(source: SourceFile, identifier: string, structure: IBaseTypeAliasStructure, apply?: boolean): void; /** * Basic interface structure. */ export interface IBaseInterfaceStructure extends ISharedTypeStructure { extends?: (string | WriterFunction)[] | WriterFunction; } /** * update base structure of interface export. * @param source SourceFile * @param identifier interface identifier * @param structure {@link IBaseInterfaceStructure } updated structure * @param apply save source file * @returns void */ export declare function updateInterfaceExportStructure(source: SourceFile, identifier: string, structure: IBaseInterfaceStructure, apply?: boolean): void;