SOURCE
tcmts.cli.suites.test.SOURCE · #ymhf6wx2 · term · runs anywhere
export const SOURCE = `export const double = (n: number) => n * 2;
export const table = [1, 2, 3].map(double);
export const unused = [4, 5].map(double);
export const stamp = [Date.now()].map(double);
export const globals = Object.keys(globalThis);
export const schema = (props: Record<string, unknown>) => ({ type: "object", properties: props });
export const tools = [
{ name: "a", input: schema({}), run: () => Date.now(), wait: async () => (await Promise.resolve(), 1) },
];
export const registry: string[] = [];
export const register = (name: string) => registry.push(name);
export const registered = register("x");
export const options: Record<string, number> = {};
export const configured = Object.assign(options, { a: 1 });
export const option = (k: string) => options[k];
export function main() {
return table.length + registry.length;
}
`
used by