added monaco code to public js folder and removed cdn

This commit is contained in:
BanceDev 2024-09-30 21:42:19 -04:00
parent 165e17f844
commit 4a7483509e
1387 changed files with 1185013 additions and 24 deletions

View file

@ -0,0 +1,37 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export class Lazy {
constructor(executor) {
this.executor = executor;
this._didRun = false;
}
/**
* Get the wrapped value.
*
* This will force evaluation of the lazy value if it has not been resolved yet. Lazy values are only
* resolved once. `getValue` will re-throw exceptions that are hit while resolving the value
*/
get value() {
if (!this._didRun) {
try {
this._value = this.executor();
}
catch (err) {
this._error = err;
}
finally {
this._didRun = true;
}
}
if (this._error) {
throw this._error;
}
return this._value;
}
/**
* Get the wrapped value without forcing evaluation.
*/
get rawValue() { return this._value; }
}