import type { Cell } from "../lib/notebook.js"; export type TranspiledJavaScript = { /** the source code of a JavaScript function defining the primary variable */ body: string; /** any unbound references in body; corresponds to the body arguments, in order */ inputs?: string[]; /** if present, the body returns an object of named outputs; alternative to output */ outputs?: string[]; /** if present, the body returns a single named output; alternative to outputs */ output?: string; /** whether to implicitly display the body value (e.g., an expression) */ autodisplay?: boolean; /** whether to implicitly derive a view; requires viewof output */ autoview?: boolean; /** whether to implicitly derive a mutable; requires mutable output */ automutable?: boolean; /** the names of any referenced files */ files?: Set; /** the names of any referenced databases */ databases?: Set; /** the names of any referenced secrets */ secrets?: Set; }; export type TranspileOptions = { /** If true, resolve local imports paths relative to document.baseURI. */ resolveLocalImports?: boolean; /** If true, resolve file using import.meta.url (so Vite treats it as an asset). */ resolveFiles?: boolean; }; /** @deprecated */ export declare function transpile(input: string, mode: Cell["mode"], options?: TranspileOptions): TranspiledJavaScript; export declare function transpile(input: Cell, options?: TranspileOptions): TranspiledJavaScript; export declare function transpileJavaScript(input: string, options?: TranspileOptions): TranspiledJavaScript;