Skip to content

Exports

Vals with triggers (HTTP, Cron, Email) require at least one export: the function to run when that val is triggered. If your val has multiple exports, then we require one of them to the default export, which will be the function that runs when the val is triggered.

Script vals can export anything or nothing.

ExampleRun in Val Town ↗
/**
* Note the 'export' keyword
*/
export function handleEmail(email: Email) {
console.log("ok!");
}