[DEPRECATED] Common base for my other typescript projects
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
408 B

/**
* System tools (only available when targetting Deno, not on browsers)
*/
/**
* Mockable Deno equivalent
*/
export const Sys: typeof Deno = new Proxy({} as typeof Deno, {
get(obj: any, prop: keyof typeof Deno) {
return obj.hasOwnProperty(prop) ? obj[prop] : Deno[prop];
},
set: function (obj: any, prop, value) {
obj[prop] = value;
console.log(obj, prop);
return true;
},
});