/** * The JavaScript the emitter writes about itself: the marker that ties an * emitted node to its authoring span, the shapes the source map and the * embedded-JavaScript modules are carried in, the two depth and self-reference * constants the runtime `Type` emission is bounded by, and the small renderers * every family shares. * * D114 R1c: these were module-level declarations in `emitter.ts`. They are pure * — they read no emitter state — and both `emitter.ts` and its collaborators * use them, so they live where neither has to import the other. */ import type { EmbeddedJavaScriptDeclaration, Expression, ExternModuleContract } from "../ast.ts"; import { type Span } from "../source.ts"; export interface JavaScriptNode { readonly id: number; readonly code: string; readonly sourceSpan: Span; } export interface GeneratedMapping { readonly offset: number; readonly sourceSpan: Span; } export interface PreparedEmbeddedJavaScriptModule { readonly statement: EmbeddedJavaScriptDeclaration; readonly specifier: `./${string}.js`; readonly factoryName: string | null; readonly localFactoryName: string | null; readonly code: string; readonly mappings: readonly GeneratedMapping[]; } export declare const javaScriptNodeMarker: RegExp; export declare const copyPlanSelfReference = "__velarCopyPlanSelf"; export declare const builtinErrorRuntimeNames: ReadonlyMap; export declare function javaScriptMemberAccess(name: string): string; export declare function mappedSource(source: string, sourceStart: number): { readonly code: string; readonly mappings: readonly GeneratedMapping[]; }; export declare function contractExportNames(contract: ExternModuleContract): ReadonlySet; export declare function emitCheckedEmbeddedJavaScript(statement: EmbeddedJavaScriptDeclaration, factoryName: string): { readonly code: string; readonly mappings: readonly GeneratedMapping[]; }; export declare function requiredValueDescription(expression: Expression): string; //# sourceMappingURL=javascript.d.ts.map