mirror of
https://github.com/morluto/rea.git
synced 2026-10-30 19:35:56 +00:00
* refactor(javascript): break the semantic analysis import cycle Split shared semantic facts out of the analysis hub so projectors of effects, evaluation, and identity no longer import one another in a cycle. * refactor(javascript): share the import specifier reader Read static imports in one module used by the boundary checker and both cycle guards, so those rules cannot drift apart. --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
19 lines
544 B
TypeScript
19 lines
544 B
TypeScript
/** One static import or re-export specifier and its source line. */
|
|
export interface ImportSpecifierFact {
|
|
readonly specifier: string;
|
|
readonly line: number;
|
|
}
|
|
|
|
/** Static string specifier on one import or re-export node, when it has one. */
|
|
export function importSpecifier(node: {
|
|
readonly type: string;
|
|
}): string | undefined;
|
|
|
|
/**
|
|
* Static import and re-export specifiers in source order.
|
|
* Comments and string literals are not imports.
|
|
*/
|
|
export function readImportSpecifiers(
|
|
source: string,
|
|
): readonly ImportSpecifierFact[];
|