js-slang
Version:
Javascript-based implementations of Source, written in Typescript
25 lines (24 loc) • 923 B
TypeScript
import type es from 'estree';
import type { Context } from '../../types';
export declare const defaultAnalysisOptions: ImportAnalysisOptions;
/**
* Options to configure import analysis
*/
export type ImportAnalysisOptions = {
/**
* Set to true to allow trying to import symbols that aren't exported by
* the module being imported
*/
allowUndefinedImports: boolean;
/**
* Set to true to throw errors when different imported symbols are given
* the same declared name
*/
throwOnDuplicateNames: boolean;
};
/**
* Import and Export analyzer:
* - Checks for undefined imports
* - Checks for different imports being given the same local name
*/
export default function analyzeImportsAndExports(programs: Record<string, es.Program>, entrypointFilePath: string, topoOrder: string[], { nativeStorage: { loadedModules } }: Context, options?: Partial<ImportAnalysisOptions>): void;