property ScriptResult.value

The script's export default, or undefined when it has none.

A module cannot return, so this is the only way a script hands a value back. What arrives is JSON-safe by construction: the value is checked in the page before it crosses, and one that would arrive changed — a Map as {}, a Date as a string, a dropped function — is withheld rather than altered. Return plain data if you mean to read this.

Type

unknown

Usage

import { type ScriptResult } from "lib/api/run.ts";