silverbullet/cmd/test/test_func.test.ts

11 lines
266 B
TypeScript
Raw Normal View History

2025-01-16 16:15:53 +08:00
// import * as YAML from "js-yaml";
2024-07-27 01:16:08 +08:00
export async function hello() {
2024-08-02 23:14:40 +08:00
// @ts-ignore: syscall is a global function
const numbers = await syscall("addNumbers", 1, 2);
return {
2025-01-16 16:15:53 +08:00
jsonMessage: JSON.stringify({ hello: "world" }),
2024-08-02 23:14:40 +08:00
addedNumbers: numbers,
};
2024-07-27 01:16:08 +08:00
}