2022-03-07 09:21:02 +00:00
|
|
|
declare global {
|
2022-03-24 09:48:56 +00:00
|
|
|
function syscall(name: string, ...args: any[]): Promise<any>;
|
2022-03-14 09:07:38 +00:00
|
|
|
}
|
|
|
|
|
2022-07-04 07:34:11 +00:00
|
|
|
// This is the case when running tests only, so giving it a dummy syscall function
|
|
|
|
if (typeof self === "undefined") {
|
|
|
|
// @ts-ignore
|
|
|
|
self = {
|
|
|
|
syscall: (name: string, ...args: any[]) => {
|
|
|
|
throw new Error("Not implemented here");
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2022-03-24 09:48:56 +00:00
|
|
|
export const syscall = self.syscall;
|