/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import type * as ts from "typescript"; import type { TsModule } from "./types.js"; /** The `ImportDeclaration` a symbol's (local, un-aliased) declaration belongs to, * or undefined. Uses the LOCAL import symbol — the declaration IS the * ImportSpecifier / NamespaceImport / ImportClause — and does NOT resolve the * alias, which would jump into the imported package and lose the specifier. */ export declare function importDeclarationOf(sym: ts.Symbol | undefined, t: TsModule): ts.ImportDeclaration | undefined; /** Does `id` resolve to a binding imported from an `@elaraai/*` package? The whole * East ecosystem API — `East`, `Expr`, `variant`/`some`, `ArrayType`/`StructType`, * `GoogleOr`, `Data`, … — is recognised by SYMBOL, never a brittle name list. */ export declare function resolvesToEastImport(id: ts.Identifier, checker: ts.TypeChecker, t: TsModule): boolean; /** Does this source file statically import or re-export from any `@elaraai/*` * package? — the signal that it is East/e3 source rather than plain TypeScript. * Cached per source file. */ export declare function importsEastPackage(sf: ts.SourceFile, t: TsModule): boolean; /** Does this file DECLARE an East/e3 program — an `East.(…)` call * (function/asyncFunction/platform/…, with `East` symbol-resolved to an * `@elaraai/*` import), an e3 definition call (`e3.input`/`e3.task`/… on the * `@elaraai/e3` default import), or a `ui(…)` surface (the `@elaraai/e3-ui` * import)? Host-side TOOLING (CLIs, build scripts, renderers) imports * `@elaraai/*` for utilities but declares no program — build-time-data rules * must not treat it as deployable source. Cached per source file. */ export declare function declaresEastProgram(sf: ts.SourceFile, checker: ts.TypeChecker, t: TsModule): boolean; /** Does a relative `../src`-style import specifier resolve WITHIN the importing * file's own package? A package's own spec/example importing `../src/index.js` is * the one legitimate relative-`src` import — it cannot import its own published * name — whereas reaching into ANOTHER package's `src` should use that package's * published name. Conservative (treats as own-package, i.e. allowed) if the * filesystem can't be consulted. */ export declare function resolvesWithinOwnPackage(sourceFileName: string, specifierText: string): boolean; //# sourceMappingURL=east-source.d.ts.map