1
0
silverbullet/syscall/silverbullet-syscall/syscall.ts
Zef Hemel 561aa6891f
Migrate to Deno (#86)
Big bang migration to Deno 🤯
2022-10-10 14:50:21 +02:00

17 lines
394 B
TypeScript

declare global {
function syscall(name: string, ...args: any[]): Promise<any>;
}
// This is the case when running tests only, so giving it a dummy syscall function
if (typeof self === "undefined") {
// @ts-ignore: test
// deno-lint-ignore no-global-assign
self = {
syscall: () => {
throw new Error("Not implemented here");
},
};
}
export const syscall = self.syscall;