feat: Create filesystem interface and a physical filesystem

This commit is contained in:
2023-09-18 10:31:50 +03:00
parent 8c049ac08f
commit da4b35f506
12 changed files with 340 additions and 27 deletions

View File

@@ -37,6 +37,7 @@ interface Internals {
var env: Environment = arguments[0], internals: Internals = arguments[1];
globalThis.log = internals.constructor.log;
var i = 0.0;
try {
run('values/object');

View File

@@ -2,11 +2,12 @@ define("values/errors", () => {
var Error = env.global.Error = function Error(msg: string) {
if (msg === undefined) msg = '';
else msg += '';
return Object.setPrototypeOf({
return {
message: msg,
stack: [] as string[],
}, Error.prototype);
__proto__: Error.prototype,
} as any;
} as ErrorConstructor;
setConstr(Error.prototype, Error);