import { FullPosition, LineColPosition } from '../base/Position'; import { ArkFile, Language } from './ArkFile'; import { ArkSignature, ClassSignature, LocalSignature, MethodSignature, NamespaceSignature } from './ArkSignature'; import { ArkBaseModel, ModifierType } from './ArkBaseModel'; import { ArkError } from '../common/ArkError'; import { CommentsMetadata } from './ArkMetadata'; import { ArkNamespace } from './ArkNamespace'; export type ExportSignature = NamespaceSignature | ClassSignature | MethodSignature | LocalSignature; export declare enum ExportType { NAME_SPACE = 0, CLASS = 1, METHOD = 2, LOCAL = 3, TYPE = 4, UNKNOWN = 9 } /** * Shift amount for export type encoding in ExportInfo tags field. * Uses CLASS_SPECIFIC_TAG_SHIFT as the base offset for class-specific properties. */ export declare const EXPORT_TYPE_SHIFT = 16; /** * Mask for extracting export type from ExportInfo tags field. * Covers 4 bits for up to 16 export type values. */ export declare const EXPORT_TYPE_MASK: number; export interface ArkExport extends ArkSignature { getModifiers(): number; containsModifier(modifierType: ModifierType): boolean; getName(): string; getExportType(): ExportType; } export interface FromInfo { isDefault(): boolean; getOriginName(): string; getFrom(): string | undefined; getDeclaringArkFile(): ArkFile; } /** * @category core/model */ export declare class ExportInfo extends ArkBaseModel implements FromInfo { private nameBeforeAs?; private exportClauseName; private arkExport?; private exportFrom?; /** The full position (start/end line/col) of this export in the source file. */ private originFullPosition; private sourceCode?; private declaringArkFile; private declaringArkNamespace?; private constructor(); /** * Returns the program language of the file where this export info defined. */ getLanguage(): Language; getFrom(): string | undefined; getOriginName(): string; getExportClauseName(): string; setExportClauseType(exportClauseType: ExportType): void; getExportClauseType(): ExportType; getNameBeforeAs(): string | undefined; setArkExport(value: ArkExport | null): void; getArkExport(): ArkExport | undefined | null; isDefault(): boolean; /** * @deprecated Use getOriginFullPosition() instead. * @returns The LineColPosition of this export. */ getOriginTsPosition(): LineColPosition; /** * Returns the full position (start/end line/col) of this export in the source file. * @returns The full position in the source code of this export. */ getOriginFullPosition(): FullPosition; /** * Returns the source text of the export extracted from the declaring ArkFile * using the export's origin position. Implements lazy loading with caching. * @returns The source text of the export, or empty string if unavailable. */ getTsSourceCode(): string; /** * Clears the cached source text, forcing re-extraction on next getTsSourceCode call. */ clearSourceCode(): void; getDeclaringArkFile(): ArkFile; getDeclaringArkNamespace(): ArkNamespace | undefined; static Builder: { new (): { exportInfo: ExportInfo; exportClauseName(exportClauseName: string): any; exportClauseType(exportClauseType: ExportType): any; nameBeforeAs(nameBeforeAs: string): any; modifiers(modifiers: number): any; /** * @deprecated Use originFullPosition() instead. * @param originTsPosition - The LineColPosition to set. */ originTsPosition(originTsPosition: LineColPosition): any; /** * Sets the full position of this export in the source file. * @param originFullPosition - The full position in the source code to set. */ originFullPosition(originFullPosition: FullPosition): any; /** * @deprecated Source text is now stored on ArkFile only. This method has no effect. * @param _tsSourceCode - The source code (ignored). */ tsSourceCode(_tsSourceCode: string): any; /** * Sets the declaring ArkFile of this export. * @param value - The ArkFile to set. */ declaringArkFile(value: ArkFile): any; /** * Sets the declaring ArkNamespace of this export. * @param value - The ArkNamespace to set. */ declaringArkNamespace(value: ArkNamespace): any; arkExport(value: ArkExport): any; exportFrom(exportFrom: string): any; setLeadingComments(commentsMetadata: CommentsMetadata): any; setTrailingComments(commentsMetadata: CommentsMetadata): any; build(): ExportInfo; }; }; validate(): ArkError; clearAllReferences(): void; } //# sourceMappingURL=ArkExport.d.ts.map