/** A row the script yields. Must carry an `id` — the model's identity column. */ export type ScriptRecord = Record & { id: string | number; }; /** * What a script module returns: either a bare array of records, or an object * carrying a `records` array. The script recomputes the whole table each run, * so it returns every row. */ export type ScriptResult = ScriptRecord[] | { records: ScriptRecord[]; }; /** * The shape a script file's `export default` must have — annotate the default * export with this to get its return value type-checked. */ export type ScriptModule = () => ScriptResult | Promise; export type BundleScriptOptions = { /** * esbuild `target` for the compiled output. Defaults to the Node version the * backend sandbox runs (`node22`). */ target?: string; }; /** * Compile a script file into the JS string a `defineScript` model's `script` * config carries. The file must `export default` a {@link ScriptModule}. Bundles * the file's local import graph; the sandbox's built-in modules stay external. * Runs synchronously (via esbuild `buildSync`) so it slots straight into a * `defineModel` config at define time. */ export declare function bundleScript(entry: string, options?: BundleScriptOptions): string; //# sourceMappingURL=script.d.ts.map