Deno/typescript
Deno runtime
The DenoRuntime allows you to run lightweight and short-lived typescript function in a sandboxed environment. Permissions can be customized per typegraph and by default only include some HTTPs domains. It's a great way to implement custom logic and functions. All typegraphs can lazily spawn a web worker and get an incredible cold-start and continuous performance thanks to the V8 engine powering Deno.
Loading...
Instead of providing the typescript code inline, we can also point to a local file:
Loading...
Where ops.ts looks like:
// ops.ts
interface AddInput {
a: number;
b: number;
}
export function doAddition({ a, b }: AddInput) {
return a + b;
}