@hadss/hmrouter-plugin
Version:
HMRouter Compiler Plugin
16 lines (15 loc) • 826 B
TypeScript
import { Expression, SourceFile } from 'ts-morph';
import { IConstantResolver } from '../interface/IConstantResolver';
export declare class ConstantResolver implements IConstantResolver {
private importMapCache;
private readonly modulePath;
constructor(modulePath: string);
resolveConstant(value: any, sourceFile: SourceFile, filePath: string): any;
resolvePropertyValue(value: Expression, sourceFile: SourceFile, filePath: string): any;
getVariableFilePath(variableName: string, sourceFile: SourceFile, filePath: string): string;
getOtherModuleVariableFilePath(moduleName: string, variableName: string, modulePath: string): string;
private parsePrimitiveValue;
private parseConstantValue;
private parseCrossModuleVariable;
getExportedVariables(sourceFile: SourceFile): string[];
}