nemo-monaco-typescript
Advanced tools
Comparing version 4.3.19 to 4.3.20
@@ -214,2 +214,6 @@ /*--------------------------------------------------------------------------------------------- | ||
/** | ||
* manually do rename | ||
*/ | ||
manualRename?: (model: editor.ITextModel, position: Position, newName: string) => Promise<void>; | ||
/** | ||
* Event fired before reference apply | ||
@@ -216,0 +220,0 @@ */ |
{ | ||
"name": "nemo-monaco-typescript", | ||
"version": "4.3.19", | ||
"version": "4.3.20", | ||
"description": "TypeScript and JavaScript language support for Monaco Editor", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -59,3 +59,3 @@ /*--------------------------------------------------------------------------------------------- | ||
import { libFileSet } from './lib/lib.index'; | ||
import { editor, languages, Uri, Range, MarkerTag, MarkerSeverity } from './fillers/monaco-editor'; | ||
import { editor, languages, Uri, Range, MarkerTag, MarkerSeverity, } from './fillers/monaco-editor'; | ||
//#region utils copied from typescript to prevent loading the entire typescriptServices --- | ||
@@ -1212,8 +1212,28 @@ var IndentStyle; | ||
// --- rename ---- | ||
/** | ||
* | ||
* @returns whether the provided parameter is of type `object` but **not** | ||
* `null`, an `array`, a `regexp`, nor a `date`. | ||
*/ | ||
export function isObject(obj) { | ||
// The method can't do a type cast since there are type (like strings) which | ||
// are subclasses of any put not positvely matched by the function. Hence type | ||
// narrowing results in wrong results. | ||
return typeof obj === 'object' | ||
&& obj !== null | ||
&& !Array.isArray(obj) | ||
&& !(obj instanceof RegExp) | ||
&& !(obj instanceof Date); | ||
} | ||
function isWorkspaceTextEdit(thing) { | ||
return isObject(thing) && Uri.isUri(thing.resource) && isObject(thing.edit); | ||
} | ||
var RenameAdapter = /** @class */ (function (_super) { | ||
__extends(RenameAdapter, _super); | ||
function RenameAdapter() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
function RenameAdapter(_worker) { | ||
var _this = _super.call(this, _worker) || this; | ||
getTypeScriptDefault().manualRename = _this.manualRename.bind(_this); | ||
return _this; | ||
} | ||
RenameAdapter.prototype.provideRenameEdits = function (model, position, newName, token) { | ||
RenameAdapter.prototype.provideRenameEdits = function (model, position, newName) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -1286,4 +1306,31 @@ var resource, fileName, offset, worker, renameInfo, renameLocations, edits, _i, renameLocations_1, renameLocation, resource_1, model_1, newEdits; | ||
}; | ||
RenameAdapter.prototype.manualRename = function (model, position, newName) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var res; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, this.provideRenameEdits(model, position, newName)]; | ||
case 1: | ||
res = _a.sent(); | ||
if (res) { | ||
res.edits.forEach(function (e) { | ||
if (isWorkspaceTextEdit(e)) { | ||
var model_2 = editor.getModel(e.resource); | ||
if (!model_2) { | ||
throw new Error("Unknown Edit " + e + "."); | ||
} | ||
model_2.pushEditOperations(null, [e.edit], function () { return []; }); | ||
} | ||
else { | ||
throw new Error("Unknown Edit " + e + "."); | ||
} | ||
}); | ||
} | ||
return [2 /*return*/]; | ||
} | ||
}); | ||
}); | ||
}; | ||
return RenameAdapter; | ||
}(Adapter)); | ||
export { RenameAdapter }; |
import './monaco-languages/monaco.contribution'; | ||
import { languages, IEvent, IDisposable, Uri, editor, IRange } from './fillers/monaco-editor'; | ||
import { languages, IEvent, IDisposable, Uri, editor, IRange, Position } from './fillers/monaco-editor'; | ||
import type * as ts from './lib/typescriptServices'; | ||
@@ -199,2 +199,6 @@ export declare enum ModuleKind { | ||
/** | ||
* manually do rename | ||
*/ | ||
manualRename?: (model: editor.ITextModel, position: Position, newName: string) => Promise<void>; | ||
/** | ||
* Event fired before reference apply | ||
@@ -201,0 +205,0 @@ */ |
/*!----------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* monaco-typescript version: 4.3.19(ffd6394ffc75bb6befedc71c0bb99141327cebf4) | ||
* monaco-typescript version: 4.3.20(cfd320e9dce00b789f8acce33798434dddef4cc1) | ||
* Released under the MIT license | ||
@@ -5,0 +5,0 @@ * https://github.com/Microsoft/monaco-typescript/blob/master/LICENSE.md |
/*!----------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* monaco-typescript version: 4.3.19(ffd6394ffc75bb6befedc71c0bb99141327cebf4) | ||
* monaco-typescript version: 4.3.20(cfd320e9dce00b789f8acce33798434dddef4cc1) | ||
* Released under the MIT license | ||
* https://github.com/Microsoft/monaco-typescript/blob/master/LICENSE.md | ||
*-----------------------------------------------------------------------------*/ | ||
var __awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};define("vs/language/nemotypescript/workerManager",["require","exports","./fillers/monaco-editor"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerManager=void 0;var r=function(){function e(e,t){var n=this;this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange((function(){return n._stopWorker()})),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange((function(){return n._updateExtraLibs()}))}return e.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},e.prototype.dispose=function(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()},e.prototype._updateExtraLibs=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:return this._worker?(e=++this._updateExtraLibsToken,[4,this._worker.getProxy()]):[2];case 1:return t=n.sent(),this._updateExtraLibsToken!==e?[2]:(t.updateExtraLibs(this._defaults.getExtraLibs()),[2])}}))}))},e.prototype._getClient=function(){var e=this;if(!this._client){this._worker=n.editor.createWebWorker({moduleId:"vs/language/nemotypescript/tsWorker",label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath}});var t=this._worker.getProxy();this._defaults.getEagerModelSync()&&(t=t.then((function(t){return e._worker?e._worker.withSyncedResources(n.editor.getModels().filter((function(t){return t.getModeId()===e._modeId})).map((function(e){return e.uri}))):t}))),this._client=t}return this._client},e.prototype.getLanguageServiceWorker=function(){for(var e,t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return this._getClient().then((function(t){e=t})).then((function(e){if(t._worker)return t._worker.withSyncedResources(n)})).then((function(t){return e}))},e}();t.WorkerManager=r})),define("vs/language/nemotypescript/lib/lib.index",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.libFileSet=void 0,t.libFileSet={},t.libFileSet["lib.d.ts"]=!0,t.libFileSet["lib.dom.d.ts"]=!0,t.libFileSet["lib.dom.iterable.d.ts"]=!0,t.libFileSet["lib.es2015.collection.d.ts"]=!0,t.libFileSet["lib.es2015.core.d.ts"]=!0,t.libFileSet["lib.es2015.d.ts"]=!0,t.libFileSet["lib.es2015.generator.d.ts"]=!0,t.libFileSet["lib.es2015.iterable.d.ts"]=!0,t.libFileSet["lib.es2015.promise.d.ts"]=!0,t.libFileSet["lib.es2015.proxy.d.ts"]=!0,t.libFileSet["lib.es2015.reflect.d.ts"]=!0,t.libFileSet["lib.es2015.symbol.d.ts"]=!0,t.libFileSet["lib.es2015.symbol.wellknown.d.ts"]=!0,t.libFileSet["lib.es2016.array.include.d.ts"]=!0,t.libFileSet["lib.es2016.d.ts"]=!0,t.libFileSet["lib.es2016.full.d.ts"]=!0,t.libFileSet["lib.es2017.d.ts"]=!0,t.libFileSet["lib.es2017.full.d.ts"]=!0,t.libFileSet["lib.es2017.intl.d.ts"]=!0,t.libFileSet["lib.es2017.object.d.ts"]=!0,t.libFileSet["lib.es2017.sharedmemory.d.ts"]=!0,t.libFileSet["lib.es2017.string.d.ts"]=!0,t.libFileSet["lib.es2017.typedarrays.d.ts"]=!0,t.libFileSet["lib.es2018.asyncgenerator.d.ts"]=!0,t.libFileSet["lib.es2018.asynciterable.d.ts"]=!0,t.libFileSet["lib.es2018.d.ts"]=!0,t.libFileSet["lib.es2018.full.d.ts"]=!0,t.libFileSet["lib.es2018.intl.d.ts"]=!0,t.libFileSet["lib.es2018.promise.d.ts"]=!0,t.libFileSet["lib.es2018.regexp.d.ts"]=!0,t.libFileSet["lib.es2019.array.d.ts"]=!0,t.libFileSet["lib.es2019.d.ts"]=!0,t.libFileSet["lib.es2019.full.d.ts"]=!0,t.libFileSet["lib.es2019.object.d.ts"]=!0,t.libFileSet["lib.es2019.string.d.ts"]=!0,t.libFileSet["lib.es2019.symbol.d.ts"]=!0,t.libFileSet["lib.es2020.bigint.d.ts"]=!0,t.libFileSet["lib.es2020.d.ts"]=!0,t.libFileSet["lib.es2020.full.d.ts"]=!0,t.libFileSet["lib.es2020.intl.d.ts"]=!0,t.libFileSet["lib.es2020.promise.d.ts"]=!0,t.libFileSet["lib.es2020.sharedmemory.d.ts"]=!0,t.libFileSet["lib.es2020.string.d.ts"]=!0,t.libFileSet["lib.es2020.symbol.wellknown.d.ts"]=!0,t.libFileSet["lib.es5.d.ts"]=!0,t.libFileSet["lib.es6.d.ts"]=!0,t.libFileSet["lib.esnext.d.ts"]=!0,t.libFileSet["lib.esnext.full.d.ts"]=!0,t.libFileSet["lib.esnext.intl.d.ts"]=!0,t.libFileSet["lib.esnext.promise.d.ts"]=!0,t.libFileSet["lib.esnext.string.d.ts"]=!0,t.libFileSet["lib.esnext.weakref.d.ts"]=!0,t.libFileSet["lib.scripthost.d.ts"]=!0,t.libFileSet["lib.webworker.d.ts"]=!0,t.libFileSet["lib.webworker.importscripts.d.ts"]=!0,t.libFileSet["lib.webworker.iterable.d.ts"]=!0}));var __extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();__awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};define("vs/language/nemotypescript/languageFeatures",["require","exports","./monaco.contribution","./lib/lib.index","./fillers/monaco-editor"],(function(e,t,n,r,i){"use strict";var o;function s(e,t,n){if(void 0===n&&(n=0),"string"==typeof e)return e;if(void 0===e)return"";var r="";if(n){r+=t;for(var i=0;i<n;i++)r+=" "}if(r+=e.messageText,n++,e.next)for(var o=0,a=e.next;o<a.length;o++){r+=s(a[o],t,n)}return r}function a(e){return e?e.map((function(e){return e.text})).join(""):""}Object.defineProperty(t,"__esModule",{value:!0}),t.RenameAdapter=t.CodeActionAdaptor=t.FormatOnTypeAdapter=t.FormatAdapter=t.FormatHelper=t.Kind=t.OutlineAdapter=t.ReferenceAdapter=t.DefinitionAdapter=t.OccurrencesAdapter=t.QuickInfoAdapter=t.SignatureHelpAdapter=t.SuggestAdapter=t.DiagnosticsAdapter=t.LibFiles=t.Adapter=t.flattenDiagnosticMessageText=void 0,function(e){e[e.None=0]="None",e[e.Block=1]="Block",e[e.Smart=2]="Smart"}(o||(o={})),t.flattenDiagnosticMessageText=s;var l=function(){function e(e){this._worker=e}return e.prototype._textSpanToRange=function(e,t){var n=e.getPositionAt(t.start),r=e.getPositionAt(t.start+t.length);return{startLineNumber:n.lineNumber,startColumn:n.column,endLineNumber:r.lineNumber,endColumn:r.column}},e}();t.Adapter=l;var u,c=function(){function e(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}return e.prototype.isLibFile=function(e){return!!e&&(0===e.path.indexOf("/lib.")&&!!r.libFileSet[e.path.slice(1)])},e.prototype.getOrCreateModel=function(e){var t=i.editor.getModel(e);return t||(this.isLibFile(e)&&this._hasFetchedLibFiles?i.editor.createModel(this._libFiles[e.path.slice(1)],"nemotypescript",e):null)},e.prototype._containsLibFile=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];if(this.isLibFile(r))return!0}return!1},e.prototype.fetchLibFilesIfNecessary=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return this._containsLibFile(e)?[4,this._fetchLibFiles()]:[2];case 1:return t.sent(),[2]}}))}))},e.prototype._fetchLibFiles=function(){var e=this;return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then((function(e){return e.getLibFiles()})).then((function(t){e._hasFetchedLibFiles=!0,e._libFiles=t}))),this._fetchLibFilesPromise},e}();t.LibFiles=c,function(e){e[e.Warning=0]="Warning",e[e.Error=1]="Error",e[e.Suggestion=2]="Suggestion",e[e.Message=3]="Message"}(u||(u={}));var d=function(e){function t(t,r,o,s){var a=e.call(this,s)||this;a._libFiles=t,a._defaults=r,a._selector=o,a._disposables=[],a._listener=Object.create(null);var l=function(e){if(e.getModeId()===o){var t,n=e.onDidChangeContent((function(){clearTimeout(t),t=setTimeout((function(){return a._doValidate(e)}),500)}));a._listener[e.uri.toString()]={dispose:function(){n.dispose(),clearTimeout(t)}},a._doValidate(e)}},u=function(e){i.editor.setModelMarkers(e,a._selector,[]);var t=e.uri.toString();a._listener[t]&&(a._listener[t].dispose(),delete a._listener[t])};a._disposables.push(i.editor.onDidCreateModel(l)),a._disposables.push(i.editor.onWillDisposeModel(u)),a._disposables.push(i.editor.onDidChangeModelLanguage((function(e){u(e.model),l(e.model)}))),a._disposables.push({dispose:function(){for(var e=0,t=i.editor.getModels();e<t.length;e++){var n=t[e];u(n)}}});var c=function(){for(var e=0,t=i.editor.getModels();e<t.length;e++){var n=t[e];u(n),l(n)}};return a._disposables.push(a._defaults.onDidChange(c)),a._disposables.push(a._defaults.onDidExtraLibsChange(c)),i.editor.getModels().forEach(l),n.getTypeScriptDefault().doValidate=a._doValidate.bind(a),a}return __extends(t,e),t.prototype.dispose=function(){this._disposables.forEach((function(e){return e&&e.dispose()})),this._disposables=[]},t.prototype._doValidate=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,r,o,s,a,l,u,c,d=this;return __generator(this,(function(p){switch(p.label){case 0:return[4,this._worker(e.uri)];case 1:return t=p.sent(),e.isDisposed()?[2]:(n=[],r=this._defaults.getDiagnosticsOptions(),o=r.noSyntaxValidation,s=r.noSemanticValidation,a=r.noSuggestionDiagnostics,o||n.push(t.getSyntacticDiagnostics(e.uri.toString())),s||n.push(t.getSemanticDiagnostics(e.uri.toString())),a||n.push(t.getSuggestionDiagnostics(e.uri.toString())),[4,Promise.all(n)]);case 2:return!(l=p.sent())||e.isDisposed()?[2]:(u=l.reduce((function(e,t){return t.concat(e)}),[]).filter((function(e){return-1===(d._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(e.code)})),c=u.map((function(e){return e.relatedInformation||[]})).reduce((function(e,t){return t.concat(e)}),[]).map((function(e){return e.file?i.Uri.parse(e.file.fileName):null})),[4,this._libFiles.fetchLibFilesIfNecessary(c)]);case 3:return p.sent(),e.isDisposed()?[2]:(i.editor.setModelMarkers(e,this._selector,u.map((function(t){return d._convertDiagnostics(e,t)}))),[2])}}))}))},t.prototype._convertDiagnostics=function(e,t){var n=t.start||0,r=t.length||1,o=e.getPositionAt(n),a=o.lineNumber,l=o.column,u=e.getPositionAt(n+r),c=u.lineNumber,d=u.column,p=[];return t.reportsUnnecessary&&p.push(i.MarkerTag.Unnecessary),t.reportsDeprecated&&p.push(i.MarkerTag.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:d,message:s(t.messageText,"\n"),code:t.code.toString(),tags:p,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}},t.prototype._convertRelatedInformation=function(e,t){var n=this;if(t){var r=[];return t.forEach((function(t){var o=e;if(t.file){var a=i.Uri.parse(t.file.fileName);o=n._libFiles.getOrCreateModel(a)}if(o){var l=t.start||0,u=t.length||1,c=o.getPositionAt(l),d=c.lineNumber,p=c.column,g=o.getPositionAt(l+u),f=g.lineNumber,b=g.column;r.push({resource:o.uri,startLineNumber:d,startColumn:p,endLineNumber:f,endColumn:b,message:s(t.messageText,"\n")})}})),r}},t.prototype._tsDiagnosticCategoryToMarkerSeverity=function(e){switch(e){case u.Error:return i.MarkerSeverity.Error;case u.Message:return i.MarkerSeverity.Info;case u.Warning:return i.MarkerSeverity.Warning;case u.Suggestion:return i.MarkerSeverity.Hint}return i.MarkerSeverity.Info},t}(l);t.DiagnosticsAdapter=d;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"triggerCharacters",{get:function(){return["."]},enumerable:!1,configurable:!0}),t.prototype.provideCompletionItems=function(e,n,r,o){return __awaiter(this,void 0,void 0,(function(){var r,o,s,a,l,u;return __generator(this,(function(c){switch(c.label){case 0:return r=e.getWordUntilPosition(n),o=new i.Range(n.lineNumber,r.startColumn,n.lineNumber,r.endColumn),s=e.uri,a=e.getOffsetAt(n),[4,this._worker(s)];case 1:return l=c.sent(),e.isDisposed()?[2]:[4,l.getCompletionsAtPosition(s.toString(),a)];case 2:return!(u=c.sent())||e.isDisposed()?[2]:[2,{suggestions:u.entries.map((function(r){var l,u=o;if(r.replacementSpan){var c=e.getPositionAt(r.replacementSpan.start),d=e.getPositionAt(r.replacementSpan.start+r.replacementSpan.length);u=new i.Range(c.lineNumber,c.column,d.lineNumber,d.column)}var p=[];return-1!==(null===(l=r.kindModifiers)||void 0===l?void 0:l.indexOf("deprecated"))&&p.push(i.languages.CompletionItemTag.Deprecated),{uri:s,position:n,offset:a,range:u,label:r.name,insertText:r.name,sortText:r.sortText,kind:t.convertKind(r.kind),tags:p}}))}]}}))}))},t.prototype.resolveCompletionItem=function(e,n){return __awaiter(this,void 0,void 0,(function(){var n,r,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:return r=(n=e).uri,i=n.position,o=n.offset,[4,this._worker(r)];case 1:return[4,l.sent().getCompletionEntryDetails(r.toString(),o,n.label)];case 2:return(s=l.sent())?[2,{uri:r,position:i,label:s.name,kind:t.convertKind(s.kind),detail:a(s.displayParts),documentation:{value:t.createDocumentationString(s)}}]:[2,n]}}))}))},t.convertKind=function(e){switch(e){case S.primitiveType:case S.keyword:return i.languages.CompletionItemKind.Keyword;case S.variable:case S.localVariable:return i.languages.CompletionItemKind.Variable;case S.memberVariable:case S.memberGetAccessor:case S.memberSetAccessor:return i.languages.CompletionItemKind.Field;case S.function:case S.memberFunction:case S.constructSignature:case S.callSignature:case S.indexSignature:return i.languages.CompletionItemKind.Function;case S.enum:return i.languages.CompletionItemKind.Enum;case S.module:return i.languages.CompletionItemKind.Module;case S.class:return i.languages.CompletionItemKind.Class;case S.interface:return i.languages.CompletionItemKind.Interface;case S.warning:return i.languages.CompletionItemKind.File}return i.languages.CompletionItemKind.Property},t.createDocumentationString=function(e){var t=a(e.documentation);if(e.tags)for(var n=0,r=e.tags;n<r.length;n++){t+="\n\n"+g(r[n])}return t},t}(l);function g(e){var t="*@"+e.name+"*";if("param"===e.name&&e.text){var n=e.text.split(" "),r=n[0],i=n.slice(1);t+="`"+r+"`",i.length>0&&(t+=" — "+i.join(" "))}else e.text&&(t+=" — "+e.text);return t}t.SuggestAdapter=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.signatureHelpTriggerCharacters=["(",","],t}return __extends(t,e),t._toSignatureHelpTriggerReason=function(e){switch(e.triggerKind){case i.languages.SignatureHelpTriggerKind.TriggerCharacter:return e.triggerCharacter?e.isRetrigger?{kind:"retrigger",triggerCharacter:e.triggerCharacter}:{kind:"characterTyped",triggerCharacter:e.triggerCharacter}:{kind:"invoked"};case i.languages.SignatureHelpTriggerKind.ContentChange:return e.isRetrigger?{kind:"retrigger"}:{kind:"invoked"};case i.languages.SignatureHelpTriggerKind.Invoke:default:return{kind:"invoked"}}},t.prototype.provideSignatureHelp=function(e,n,r,i){return __awaiter(this,void 0,void 0,(function(){var r,o,s,l,u;return __generator(this,(function(c){switch(c.label){case 0:return r=e.uri,o=e.getOffsetAt(n),[4,this._worker(r)];case 1:return s=c.sent(),e.isDisposed()?[2]:[4,s.getSignatureHelpItems(r.toString(),o,{triggerReason:t._toSignatureHelpTriggerReason(i)})];case 2:return!(l=c.sent())||e.isDisposed()?[2]:(u={activeSignature:l.selectedItemIndex,activeParameter:l.argumentIndex,signatures:[]},l.items.forEach((function(e){var t={label:"",parameters:[]};t.documentation={value:a(e.documentation)},t.label+=a(e.prefixDisplayParts),e.parameters.forEach((function(n,r,i){var o=a(n.displayParts),s={label:o,documentation:{value:a(n.documentation)}};t.label+=o,t.parameters.push(s),r<i.length-1&&(t.label+=a(e.separatorDisplayParts))})),t.label+=a(e.suffixDisplayParts),u.signatures.push(t)})),[2,{value:u,dispose:function(){}}])}}))}))},t}(l);t.SignatureHelpAdapter=f;var b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.provideHover=function(e,t,n){return __awaiter(this,void 0,void 0,(function(){var n,r,i,o,s,l,u;return __generator(this,(function(c){switch(c.label){case 0:return n=e.uri,r=e.getOffsetAt(t),[4,this._worker(n)];case 1:return i=c.sent(),e.isDisposed()?[2]:[4,i.getQuickInfoAtPosition(n.toString(),r)];case 2:return!(o=c.sent())||e.isDisposed()?[2]:(s=a(o.documentation),l=o.tags?o.tags.map((function(e){return g(e)})).join(" \n\n"):"",u=a(o.displayParts),[2,{range:this._textSpanToRange(e,o.textSpan),contents:[{value:"```typescript\n"+u+"\n```\n"},{value:s+(l?"\n\n"+l:"")}]}])}}))}))},t}(l);t.QuickInfoAdapter=b;var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.provideDocumentHighlights=function(e,t,n){return __awaiter(this,void 0,void 0,(function(){var n,r,o,s,a=this;return __generator(this,(function(l){switch(l.label){case 0:return n=e.uri,r=e.getOffsetAt(t),[4,this._worker(n)];case 1:return o=l.sent(),e.isDisposed()?[2]:[4,o.getOccurrencesAtPosition(n.toString(),r)];case 2:return!(s=l.sent())||e.isDisposed()?[2]:[2,s.map((function(t){return{range:a._textSpanToRange(e,t.textSpan),kind:t.isWriteAccess?i.languages.DocumentHighlightKind.Write:i.languages.DocumentHighlightKind.Text}}))]}}))}))},t}(l);t.OccurrencesAdapter=h;var m=function(e){function t(t,n){var r=e.call(this,n)||this;return r._libFiles=t,r}return __extends(t,e),t.prototype.provideDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,(function(){var r,o,s,a,l,u,c,d,p,g,f,b;return __generator(this,(function(h){switch(h.label){case 0:return r=e.uri,o=e.getOffsetAt(t),[4,this._worker(r)];case 1:return s=h.sent(),e.isDisposed()?[2]:[4,s.getDefinitionAtPosition(r.toString(),o)];case 2:return!(a=h.sent())||e.isDisposed()?[2]:[4,this._libFiles.fetchLibFilesIfNecessary(a.map((function(e){return i.Uri.parse(e.fileName)})))];case 3:if(h.sent(),e.isDisposed())return[2];for(l=[],u=0,c=a;u<c.length;u++)if(d=c[u],p=i.Uri.parse(d.fileName),g=this._libFiles.getOrCreateModel(p))l.push({uri:p,range:this._textSpanToRange(g,d.textSpan)});else if(f=n.getTypeScriptDefault().getExtraLibs()[d.fileName])return b=i.editor.createModel(f.content,"nemotypescript",p),[2,{uri:p,range:this._textSpanToRange(b,d.textSpan)}];return[2,l]}}))}))},t}(l);t.DefinitionAdapter=m;var _=function(e){function t(t,n){var r=e.call(this,n)||this;return r._libFiles=t,r}return __extends(t,e),t.prototype.provideReferences=function(e,t,r,o){return __awaiter(this,void 0,void 0,(function(){var r,o,s,a,l,u,c,d,p,g;return __generator(this,(function(f){switch(f.label){case 0:return r=e.uri,o=e.getOffsetAt(t),[4,this._worker(r)];case 1:return s=f.sent(),e.isDisposed()?[2]:[4,s.getReferencesAtPosition(r.toString(),o)];case 2:return!(a=f.sent())||e.isDisposed()?[2]:[4,this._libFiles.fetchLibFilesIfNecessary(a.map((function(e){return i.Uri.parse(e.fileName)})))];case 3:if(f.sent(),e.isDisposed())return[2];for(l=[],u=0,c=a;u<c.length;u++)d=c[u],p=i.Uri.parse(d.fileName),(g=this._libFiles.getOrCreateModel(p))&&l.push({uri:p,range:this._textSpanToRange(g,d.textSpan)});return n.getTypeScriptDefault().onWillReferences?[2,n.getTypeScriptDefault().onWillReferences(l)]:[2,l]}}))}))},t}(l);t.ReferenceAdapter=_;var v=function(e){function t(t){var r=e.call(this,t)||this;return n.getTypeScriptDefault().getNavigationBarItems=r.getNavigationBarItems.bind(r),n.getTypeScriptDefault().getExportFunctionInfo=r.getExportFunctionInfo.bind(r),r}return __extends(t,e),t.prototype.provideDocumentSymbols=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,r,o,s,a=this;return __generator(this,(function(l){switch(l.label){case 0:return t=e.uri,[4,this._worker(t)];case 1:return n=l.sent(),e.isDisposed()?[2]:[4,n.getNavigationBarItems(t.toString())];case 2:return!(r=l.sent())||e.isDisposed()?[2]:(o=function(t,n,r){var s={name:n.text,detail:"",kind:y[n.kind]||i.languages.SymbolKind.Variable,range:a._textSpanToRange(e,n.spans[0]),selectionRange:a._textSpanToRange(e,n.spans[0]),tags:[],containerName:r};if(n.childItems&&n.childItems.length>0)for(var l=0,u=n.childItems;l<u.length;l++){var c=u[l];o(t,c,s.name)}t.push(s)},s=[],r.forEach((function(e){return o(s,e)})),[2,s])}}))}))},t.prototype.getNavigationBarItems=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,r;return __generator(this,(function(i){switch(i.label){case 0:return t=e.uri,[4,this._worker(t)];case 1:return n=i.sent(),e.isDisposed()?[2]:[4,n.getNavigationBarItems(t.toString())];case 2:return!(r=i.sent())||e.isDisposed()?[2]:[2,r]}}))}))},t.prototype.getExportFunctionInfo=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,r,i,o,s=this;return __generator(this,(function(a){switch(a.label){case 0:return t=e.uri,[4,this._worker(t)];case 1:return n=a.sent(),e.isDisposed()?[2,{}]:[4,n.getExportFunctionInfo(t.toString())];case 2:return r=a.sent(),i={},[4,n.getNavigationBarItems(t.toString())];case 3:return o=a.sent(),Object.keys(r).forEach((function(t){var n=r[t],a=n.content,l=(n.pos,o.filter((function(e){return e.text===t&&"function"===e.kind&&"export"===e.kindModifiers}))[0]);i[t]={content:a,range:s._textSpanToRange(e,l.spans[0])}})),[2,i]}}))}))},t}(l);t.OutlineAdapter=v;var S=function(){function e(){}return e.unknown="",e.keyword="keyword",e.script="script",e.module="module",e.class="class",e.interface="interface",e.type="type",e.enum="enum",e.variable="var",e.localVariable="local var",e.function="function",e.localFunction="local function",e.memberFunction="method",e.memberGetAccessor="getter",e.memberSetAccessor="setter",e.memberVariable="property",e.constructorImplementation="constructor",e.callSignature="call",e.indexSignature="index",e.constructSignature="construct",e.parameter="parameter",e.typeParameter="type parameter",e.primitiveType="primitive type",e.label="label",e.alias="alias",e.const="const",e.let="let",e.warning="warning",e}();t.Kind=S;var y=Object.create(null);y[S.module]=i.languages.SymbolKind.Module,y[S.class]=i.languages.SymbolKind.Class,y[S.enum]=i.languages.SymbolKind.Enum,y[S.interface]=i.languages.SymbolKind.Interface,y[S.memberFunction]=i.languages.SymbolKind.Method,y[S.memberVariable]=i.languages.SymbolKind.Property,y[S.memberGetAccessor]=i.languages.SymbolKind.Property,y[S.memberSetAccessor]=i.languages.SymbolKind.Property,y[S.variable]=i.languages.SymbolKind.Variable,y[S.const]=i.languages.SymbolKind.Variable,y[S.localVariable]=i.languages.SymbolKind.Variable,y[S.variable]=i.languages.SymbolKind.Variable,y[S.function]=i.languages.SymbolKind.Function,y[S.localFunction]=i.languages.SymbolKind.Function;var w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t._convertOptions=function(e){return{ConvertTabsToSpaces:e.insertSpaces,TabSize:e.tabSize,IndentSize:e.tabSize,IndentStyle:o.Smart,NewLineCharacter:"\n",InsertSpaceAfterCommaDelimiter:!0,InsertSpaceAfterSemicolonInForStatements:!0,InsertSpaceBeforeAndAfterBinaryOperators:!0,InsertSpaceAfterKeywordsInControlFlowStatements:!0,InsertSpaceAfterFunctionKeywordForAnonymousFunctions:!0,InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,PlaceOpenBraceOnNewLineForControlBlocks:!1,PlaceOpenBraceOnNewLineForFunctions:!1}},t.prototype._convertTextChanges=function(e,t){return{text:t.newText,range:this._textSpanToRange(e,t.span)}},t}(l);t.FormatHelper=w;var F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.provideDocumentRangeFormattingEdits=function(e,t,n,r){return __awaiter(this,void 0,void 0,(function(){var r,i,o,s,a,l=this;return __generator(this,(function(u){switch(u.label){case 0:return r=e.uri,i=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),o=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),[4,this._worker(r)];case 1:return s=u.sent(),e.isDisposed()?[2]:[4,s.getFormattingEditsForRange(r.toString(),i,o,w._convertOptions(n))];case 2:return!(a=u.sent())||e.isDisposed()?[2]:[2,a.map((function(t){return l._convertTextChanges(e,t)}))]}}))}))},t}(w);t.FormatAdapter=F;var x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"autoFormatTriggerCharacters",{get:function(){return[";","}","\n"]},enumerable:!1,configurable:!0}),t.prototype.provideOnTypeFormattingEdits=function(e,t,n,r,i){return __awaiter(this,void 0,void 0,(function(){var i,o,s,a,l=this;return __generator(this,(function(u){switch(u.label){case 0:return i=e.uri,o=e.getOffsetAt(t),[4,this._worker(i)];case 1:return s=u.sent(),e.isDisposed()?[2]:[4,s.getFormattingEditsAfterKeystroke(i.toString(),o,n,w._convertOptions(r))];case 2:return!(a=u.sent())||e.isDisposed()?[2]:[2,a.map((function(t){return l._convertTextChanges(e,t)}))]}}))}))},t}(w);t.FormatOnTypeAdapter=x;var k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.provideCodeActions=function(e,t,n,r){return __awaiter(this,void 0,void 0,(function(){var r,i,o,s,a,l,u,c=this;return __generator(this,(function(d){switch(d.label){case 0:return r=e.uri,i=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),o=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),s=w._convertOptions(e.getOptions()),a=n.markers.filter((function(e){return e.code})).map((function(e){return e.code})).map(Number),[4,this._worker(r)];case 1:return l=d.sent(),e.isDisposed()?[2]:[4,l.getCodeFixesAtPosition(r.toString(),i,o,a,s)];case 2:return!(u=d.sent())||e.isDisposed()?[2,{actions:[],dispose:function(){}}]:[2,{actions:u.filter((function(e){return 0===e.changes.filter((function(e){return e.isNewFile})).length})).map((function(t){return c._tsCodeFixActionToMonacoCodeAction(e,n,t)})),dispose:function(){}}]}}))}))},t.prototype._tsCodeFixActionToMonacoCodeAction=function(e,t,n){for(var r=[],i=0,o=n.changes;i<o.length;i++)for(var s=0,a=o[i].textChanges;s<a.length;s++){var l=a[s];r.push({resource:e.uri,edit:{range:this._textSpanToRange(e,l.span),text:l.newText}})}return{title:n.description,edit:{edits:r},diagnostics:t.markers,kind:"quickfix"}},t}(w);t.CodeActionAdaptor=k;var A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.provideRenameEdits=function(e,t,r,o){return __awaiter(this,void 0,void 0,(function(){var o,s,a,l,u,c,d,p,g,f,b,h;return __generator(this,(function(m){switch(m.label){case 0:return o=e.uri,s=o.toString(),a=e.getOffsetAt(t),[4,this._worker(o)];case 1:return l=m.sent(),e.isDisposed()?[2]:[4,l.getRenameInfo(s,a,{allowRenameOfImportPath:!1})];case 2:if(!1===(u=m.sent()).canRename)return[2,{edits:[],rejectReason:u.localizedErrorMessage}];if(void 0!==u.fileToRename)throw new Error("Renaming files is not supported.");return[4,l.findRenameLocations(s,a,!1,!1,!1)];case 3:if(!(c=m.sent())||e.isDisposed())return[2];for(d=[],p=0,g=c;p<g.length;p++){if(f=g[p],b=i.Uri.parse(f.fileName),!(h=i.editor.getModel(b)))throw new Error("Unknown URI "+b+".");d.push({resource:b,edit:{range:this._textSpanToRange(h,f.textSpan),text:r}})}return n.getTypeScriptDefault().onWillRename?[2,{edits:n.getTypeScriptDefault().onWillRename(d)}]:[2,{edits:d}]}}))}))},t}(l);t.RenameAdapter=A})),define("vs/language/nemotypescript/tsMode",["require","exports","./workerManager","./languageFeatures","./fillers/monaco-editor"],(function(e,t,n,r,i){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),t.getTypeScriptWorker=t.setupTypeScript=void 0,t.setupTypeScript=function(e){o=function(e,t){var o=new n.WorkerManager(t,e),s=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.getLanguageServiceWorker.apply(o,e)},a=new r.LibFiles(s);return i.languages.registerCompletionItemProvider(t,new r.SuggestAdapter(s)),i.languages.registerSignatureHelpProvider(t,new r.SignatureHelpAdapter(s)),i.languages.registerHoverProvider(t,new r.QuickInfoAdapter(s)),i.languages.registerDocumentHighlightProvider(t,new r.OccurrencesAdapter(s)),i.languages.registerDefinitionProvider(t,new r.DefinitionAdapter(a,s)),i.languages.registerReferenceProvider(t,new r.ReferenceAdapter(a,s)),i.languages.registerDocumentSymbolProvider(t,new r.OutlineAdapter(s)),i.languages.registerDocumentRangeFormattingEditProvider(t,new r.FormatAdapter(s)),i.languages.registerOnTypeFormattingEditProvider(t,new r.FormatOnTypeAdapter(s)),i.languages.registerCodeActionProvider(t,new r.CodeActionAdaptor(s)),i.languages.registerRenameProvider(t,new r.RenameAdapter(s)),new r.DiagnosticsAdapter(a,e,t,s),s}(e,"nemotypescript")},t.getTypeScriptWorker=function(){return new Promise((function(e,t){if(!o)return t("TypeScript not registered!");e(o)}))}})); | ||
var __awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};define("vs/language/nemotypescript/workerManager",["require","exports","./fillers/monaco-editor"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerManager=void 0;var r=function(){function e(e,t){var n=this;this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange((function(){return n._stopWorker()})),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange((function(){return n._updateExtraLibs()}))}return e.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},e.prototype.dispose=function(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()},e.prototype._updateExtraLibs=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:return this._worker?(e=++this._updateExtraLibsToken,[4,this._worker.getProxy()]):[2];case 1:return t=n.sent(),this._updateExtraLibsToken!==e?[2]:(t.updateExtraLibs(this._defaults.getExtraLibs()),[2])}}))}))},e.prototype._getClient=function(){var e=this;if(!this._client){this._worker=n.editor.createWebWorker({moduleId:"vs/language/nemotypescript/tsWorker",label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath}});var t=this._worker.getProxy();this._defaults.getEagerModelSync()&&(t=t.then((function(t){return e._worker?e._worker.withSyncedResources(n.editor.getModels().filter((function(t){return t.getModeId()===e._modeId})).map((function(e){return e.uri}))):t}))),this._client=t}return this._client},e.prototype.getLanguageServiceWorker=function(){for(var e,t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return this._getClient().then((function(t){e=t})).then((function(e){if(t._worker)return t._worker.withSyncedResources(n)})).then((function(t){return e}))},e}();t.WorkerManager=r})),define("vs/language/nemotypescript/lib/lib.index",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.libFileSet=void 0,t.libFileSet={},t.libFileSet["lib.d.ts"]=!0,t.libFileSet["lib.dom.d.ts"]=!0,t.libFileSet["lib.dom.iterable.d.ts"]=!0,t.libFileSet["lib.es2015.collection.d.ts"]=!0,t.libFileSet["lib.es2015.core.d.ts"]=!0,t.libFileSet["lib.es2015.d.ts"]=!0,t.libFileSet["lib.es2015.generator.d.ts"]=!0,t.libFileSet["lib.es2015.iterable.d.ts"]=!0,t.libFileSet["lib.es2015.promise.d.ts"]=!0,t.libFileSet["lib.es2015.proxy.d.ts"]=!0,t.libFileSet["lib.es2015.reflect.d.ts"]=!0,t.libFileSet["lib.es2015.symbol.d.ts"]=!0,t.libFileSet["lib.es2015.symbol.wellknown.d.ts"]=!0,t.libFileSet["lib.es2016.array.include.d.ts"]=!0,t.libFileSet["lib.es2016.d.ts"]=!0,t.libFileSet["lib.es2016.full.d.ts"]=!0,t.libFileSet["lib.es2017.d.ts"]=!0,t.libFileSet["lib.es2017.full.d.ts"]=!0,t.libFileSet["lib.es2017.intl.d.ts"]=!0,t.libFileSet["lib.es2017.object.d.ts"]=!0,t.libFileSet["lib.es2017.sharedmemory.d.ts"]=!0,t.libFileSet["lib.es2017.string.d.ts"]=!0,t.libFileSet["lib.es2017.typedarrays.d.ts"]=!0,t.libFileSet["lib.es2018.asyncgenerator.d.ts"]=!0,t.libFileSet["lib.es2018.asynciterable.d.ts"]=!0,t.libFileSet["lib.es2018.d.ts"]=!0,t.libFileSet["lib.es2018.full.d.ts"]=!0,t.libFileSet["lib.es2018.intl.d.ts"]=!0,t.libFileSet["lib.es2018.promise.d.ts"]=!0,t.libFileSet["lib.es2018.regexp.d.ts"]=!0,t.libFileSet["lib.es2019.array.d.ts"]=!0,t.libFileSet["lib.es2019.d.ts"]=!0,t.libFileSet["lib.es2019.full.d.ts"]=!0,t.libFileSet["lib.es2019.object.d.ts"]=!0,t.libFileSet["lib.es2019.string.d.ts"]=!0,t.libFileSet["lib.es2019.symbol.d.ts"]=!0,t.libFileSet["lib.es2020.bigint.d.ts"]=!0,t.libFileSet["lib.es2020.d.ts"]=!0,t.libFileSet["lib.es2020.full.d.ts"]=!0,t.libFileSet["lib.es2020.intl.d.ts"]=!0,t.libFileSet["lib.es2020.promise.d.ts"]=!0,t.libFileSet["lib.es2020.sharedmemory.d.ts"]=!0,t.libFileSet["lib.es2020.string.d.ts"]=!0,t.libFileSet["lib.es2020.symbol.wellknown.d.ts"]=!0,t.libFileSet["lib.es5.d.ts"]=!0,t.libFileSet["lib.es6.d.ts"]=!0,t.libFileSet["lib.esnext.d.ts"]=!0,t.libFileSet["lib.esnext.full.d.ts"]=!0,t.libFileSet["lib.esnext.intl.d.ts"]=!0,t.libFileSet["lib.esnext.promise.d.ts"]=!0,t.libFileSet["lib.esnext.string.d.ts"]=!0,t.libFileSet["lib.esnext.weakref.d.ts"]=!0,t.libFileSet["lib.scripthost.d.ts"]=!0,t.libFileSet["lib.webworker.d.ts"]=!0,t.libFileSet["lib.webworker.importscripts.d.ts"]=!0,t.libFileSet["lib.webworker.iterable.d.ts"]=!0}));var __extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();__awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},__generator=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};define("vs/language/nemotypescript/languageFeatures",["require","exports","./monaco.contribution","./lib/lib.index","./fillers/monaco-editor"],(function(e,t,n,r,i){"use strict";var o;function s(e,t,n){if(void 0===n&&(n=0),"string"==typeof e)return e;if(void 0===e)return"";var r="";if(n){r+=t;for(var i=0;i<n;i++)r+=" "}if(r+=e.messageText,n++,e.next)for(var o=0,a=e.next;o<a.length;o++){r+=s(a[o],t,n)}return r}function a(e){return e?e.map((function(e){return e.text})).join(""):""}Object.defineProperty(t,"__esModule",{value:!0}),t.RenameAdapter=t.isObject=t.CodeActionAdaptor=t.FormatOnTypeAdapter=t.FormatAdapter=t.FormatHelper=t.Kind=t.OutlineAdapter=t.ReferenceAdapter=t.DefinitionAdapter=t.OccurrencesAdapter=t.QuickInfoAdapter=t.SignatureHelpAdapter=t.SuggestAdapter=t.DiagnosticsAdapter=t.LibFiles=t.Adapter=t.flattenDiagnosticMessageText=void 0,function(e){e[e.None=0]="None",e[e.Block=1]="Block",e[e.Smart=2]="Smart"}(o||(o={})),t.flattenDiagnosticMessageText=s;var l=function(){function e(e){this._worker=e}return e.prototype._textSpanToRange=function(e,t){var n=e.getPositionAt(t.start),r=e.getPositionAt(t.start+t.length);return{startLineNumber:n.lineNumber,startColumn:n.column,endLineNumber:r.lineNumber,endColumn:r.column}},e}();t.Adapter=l;var u,c=function(){function e(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}return e.prototype.isLibFile=function(e){return!!e&&(0===e.path.indexOf("/lib.")&&!!r.libFileSet[e.path.slice(1)])},e.prototype.getOrCreateModel=function(e){var t=i.editor.getModel(e);return t||(this.isLibFile(e)&&this._hasFetchedLibFiles?i.editor.createModel(this._libFiles[e.path.slice(1)],"nemotypescript",e):null)},e.prototype._containsLibFile=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];if(this.isLibFile(r))return!0}return!1},e.prototype.fetchLibFilesIfNecessary=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return this._containsLibFile(e)?[4,this._fetchLibFiles()]:[2];case 1:return t.sent(),[2]}}))}))},e.prototype._fetchLibFiles=function(){var e=this;return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then((function(e){return e.getLibFiles()})).then((function(t){e._hasFetchedLibFiles=!0,e._libFiles=t}))),this._fetchLibFilesPromise},e}();t.LibFiles=c,function(e){e[e.Warning=0]="Warning",e[e.Error=1]="Error",e[e.Suggestion=2]="Suggestion",e[e.Message=3]="Message"}(u||(u={}));var d=function(e){function t(t,r,o,s){var a=e.call(this,s)||this;a._libFiles=t,a._defaults=r,a._selector=o,a._disposables=[],a._listener=Object.create(null);var l=function(e){if(e.getModeId()===o){var t,n=e.onDidChangeContent((function(){clearTimeout(t),t=setTimeout((function(){return a._doValidate(e)}),500)}));a._listener[e.uri.toString()]={dispose:function(){n.dispose(),clearTimeout(t)}},a._doValidate(e)}},u=function(e){i.editor.setModelMarkers(e,a._selector,[]);var t=e.uri.toString();a._listener[t]&&(a._listener[t].dispose(),delete a._listener[t])};a._disposables.push(i.editor.onDidCreateModel(l)),a._disposables.push(i.editor.onWillDisposeModel(u)),a._disposables.push(i.editor.onDidChangeModelLanguage((function(e){u(e.model),l(e.model)}))),a._disposables.push({dispose:function(){for(var e=0,t=i.editor.getModels();e<t.length;e++){var n=t[e];u(n)}}});var c=function(){for(var e=0,t=i.editor.getModels();e<t.length;e++){var n=t[e];u(n),l(n)}};return a._disposables.push(a._defaults.onDidChange(c)),a._disposables.push(a._defaults.onDidExtraLibsChange(c)),i.editor.getModels().forEach(l),n.getTypeScriptDefault().doValidate=a._doValidate.bind(a),a}return __extends(t,e),t.prototype.dispose=function(){this._disposables.forEach((function(e){return e&&e.dispose()})),this._disposables=[]},t.prototype._doValidate=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,r,o,s,a,l,u,c,d=this;return __generator(this,(function(p){switch(p.label){case 0:return[4,this._worker(e.uri)];case 1:return t=p.sent(),e.isDisposed()?[2]:(n=[],r=this._defaults.getDiagnosticsOptions(),o=r.noSyntaxValidation,s=r.noSemanticValidation,a=r.noSuggestionDiagnostics,o||n.push(t.getSyntacticDiagnostics(e.uri.toString())),s||n.push(t.getSemanticDiagnostics(e.uri.toString())),a||n.push(t.getSuggestionDiagnostics(e.uri.toString())),[4,Promise.all(n)]);case 2:return!(l=p.sent())||e.isDisposed()?[2]:(u=l.reduce((function(e,t){return t.concat(e)}),[]).filter((function(e){return-1===(d._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(e.code)})),c=u.map((function(e){return e.relatedInformation||[]})).reduce((function(e,t){return t.concat(e)}),[]).map((function(e){return e.file?i.Uri.parse(e.file.fileName):null})),[4,this._libFiles.fetchLibFilesIfNecessary(c)]);case 3:return p.sent(),e.isDisposed()?[2]:(i.editor.setModelMarkers(e,this._selector,u.map((function(t){return d._convertDiagnostics(e,t)}))),[2])}}))}))},t.prototype._convertDiagnostics=function(e,t){var n=t.start||0,r=t.length||1,o=e.getPositionAt(n),a=o.lineNumber,l=o.column,u=e.getPositionAt(n+r),c=u.lineNumber,d=u.column,p=[];return t.reportsUnnecessary&&p.push(i.MarkerTag.Unnecessary),t.reportsDeprecated&&p.push(i.MarkerTag.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:d,message:s(t.messageText,"\n"),code:t.code.toString(),tags:p,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}},t.prototype._convertRelatedInformation=function(e,t){var n=this;if(t){var r=[];return t.forEach((function(t){var o=e;if(t.file){var a=i.Uri.parse(t.file.fileName);o=n._libFiles.getOrCreateModel(a)}if(o){var l=t.start||0,u=t.length||1,c=o.getPositionAt(l),d=c.lineNumber,p=c.column,g=o.getPositionAt(l+u),f=g.lineNumber,b=g.column;r.push({resource:o.uri,startLineNumber:d,startColumn:p,endLineNumber:f,endColumn:b,message:s(t.messageText,"\n")})}})),r}},t.prototype._tsDiagnosticCategoryToMarkerSeverity=function(e){switch(e){case u.Error:return i.MarkerSeverity.Error;case u.Message:return i.MarkerSeverity.Info;case u.Warning:return i.MarkerSeverity.Warning;case u.Suggestion:return i.MarkerSeverity.Hint}return i.MarkerSeverity.Info},t}(l);t.DiagnosticsAdapter=d;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"triggerCharacters",{get:function(){return["."]},enumerable:!1,configurable:!0}),t.prototype.provideCompletionItems=function(e,n,r,o){return __awaiter(this,void 0,void 0,(function(){var r,o,s,a,l,u;return __generator(this,(function(c){switch(c.label){case 0:return r=e.getWordUntilPosition(n),o=new i.Range(n.lineNumber,r.startColumn,n.lineNumber,r.endColumn),s=e.uri,a=e.getOffsetAt(n),[4,this._worker(s)];case 1:return l=c.sent(),e.isDisposed()?[2]:[4,l.getCompletionsAtPosition(s.toString(),a)];case 2:return!(u=c.sent())||e.isDisposed()?[2]:[2,{suggestions:u.entries.map((function(r){var l,u=o;if(r.replacementSpan){var c=e.getPositionAt(r.replacementSpan.start),d=e.getPositionAt(r.replacementSpan.start+r.replacementSpan.length);u=new i.Range(c.lineNumber,c.column,d.lineNumber,d.column)}var p=[];return-1!==(null===(l=r.kindModifiers)||void 0===l?void 0:l.indexOf("deprecated"))&&p.push(i.languages.CompletionItemTag.Deprecated),{uri:s,position:n,offset:a,range:u,label:r.name,insertText:r.name,sortText:r.sortText,kind:t.convertKind(r.kind),tags:p}}))}]}}))}))},t.prototype.resolveCompletionItem=function(e,n){return __awaiter(this,void 0,void 0,(function(){var n,r,i,o,s;return __generator(this,(function(l){switch(l.label){case 0:return r=(n=e).uri,i=n.position,o=n.offset,[4,this._worker(r)];case 1:return[4,l.sent().getCompletionEntryDetails(r.toString(),o,n.label)];case 2:return(s=l.sent())?[2,{uri:r,position:i,label:s.name,kind:t.convertKind(s.kind),detail:a(s.displayParts),documentation:{value:t.createDocumentationString(s)}}]:[2,n]}}))}))},t.convertKind=function(e){switch(e){case S.primitiveType:case S.keyword:return i.languages.CompletionItemKind.Keyword;case S.variable:case S.localVariable:return i.languages.CompletionItemKind.Variable;case S.memberVariable:case S.memberGetAccessor:case S.memberSetAccessor:return i.languages.CompletionItemKind.Field;case S.function:case S.memberFunction:case S.constructSignature:case S.callSignature:case S.indexSignature:return i.languages.CompletionItemKind.Function;case S.enum:return i.languages.CompletionItemKind.Enum;case S.module:return i.languages.CompletionItemKind.Module;case S.class:return i.languages.CompletionItemKind.Class;case S.interface:return i.languages.CompletionItemKind.Interface;case S.warning:return i.languages.CompletionItemKind.File}return i.languages.CompletionItemKind.Property},t.createDocumentationString=function(e){var t=a(e.documentation);if(e.tags)for(var n=0,r=e.tags;n<r.length;n++){t+="\n\n"+g(r[n])}return t},t}(l);function g(e){var t="*@"+e.name+"*";if("param"===e.name&&e.text){var n=e.text.split(" "),r=n[0],i=n.slice(1);t+="`"+r+"`",i.length>0&&(t+=" — "+i.join(" "))}else e.text&&(t+=" — "+e.text);return t}t.SuggestAdapter=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.signatureHelpTriggerCharacters=["(",","],t}return __extends(t,e),t._toSignatureHelpTriggerReason=function(e){switch(e.triggerKind){case i.languages.SignatureHelpTriggerKind.TriggerCharacter:return e.triggerCharacter?e.isRetrigger?{kind:"retrigger",triggerCharacter:e.triggerCharacter}:{kind:"characterTyped",triggerCharacter:e.triggerCharacter}:{kind:"invoked"};case i.languages.SignatureHelpTriggerKind.ContentChange:return e.isRetrigger?{kind:"retrigger"}:{kind:"invoked"};case i.languages.SignatureHelpTriggerKind.Invoke:default:return{kind:"invoked"}}},t.prototype.provideSignatureHelp=function(e,n,r,i){return __awaiter(this,void 0,void 0,(function(){var r,o,s,l,u;return __generator(this,(function(c){switch(c.label){case 0:return r=e.uri,o=e.getOffsetAt(n),[4,this._worker(r)];case 1:return s=c.sent(),e.isDisposed()?[2]:[4,s.getSignatureHelpItems(r.toString(),o,{triggerReason:t._toSignatureHelpTriggerReason(i)})];case 2:return!(l=c.sent())||e.isDisposed()?[2]:(u={activeSignature:l.selectedItemIndex,activeParameter:l.argumentIndex,signatures:[]},l.items.forEach((function(e){var t={label:"",parameters:[]};t.documentation={value:a(e.documentation)},t.label+=a(e.prefixDisplayParts),e.parameters.forEach((function(n,r,i){var o=a(n.displayParts),s={label:o,documentation:{value:a(n.documentation)}};t.label+=o,t.parameters.push(s),r<i.length-1&&(t.label+=a(e.separatorDisplayParts))})),t.label+=a(e.suffixDisplayParts),u.signatures.push(t)})),[2,{value:u,dispose:function(){}}])}}))}))},t}(l);t.SignatureHelpAdapter=f;var b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.provideHover=function(e,t,n){return __awaiter(this,void 0,void 0,(function(){var n,r,i,o,s,l,u;return __generator(this,(function(c){switch(c.label){case 0:return n=e.uri,r=e.getOffsetAt(t),[4,this._worker(n)];case 1:return i=c.sent(),e.isDisposed()?[2]:[4,i.getQuickInfoAtPosition(n.toString(),r)];case 2:return!(o=c.sent())||e.isDisposed()?[2]:(s=a(o.documentation),l=o.tags?o.tags.map((function(e){return g(e)})).join(" \n\n"):"",u=a(o.displayParts),[2,{range:this._textSpanToRange(e,o.textSpan),contents:[{value:"```typescript\n"+u+"\n```\n"},{value:s+(l?"\n\n"+l:"")}]}])}}))}))},t}(l);t.QuickInfoAdapter=b;var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.provideDocumentHighlights=function(e,t,n){return __awaiter(this,void 0,void 0,(function(){var n,r,o,s,a=this;return __generator(this,(function(l){switch(l.label){case 0:return n=e.uri,r=e.getOffsetAt(t),[4,this._worker(n)];case 1:return o=l.sent(),e.isDisposed()?[2]:[4,o.getOccurrencesAtPosition(n.toString(),r)];case 2:return!(s=l.sent())||e.isDisposed()?[2]:[2,s.map((function(t){return{range:a._textSpanToRange(e,t.textSpan),kind:t.isWriteAccess?i.languages.DocumentHighlightKind.Write:i.languages.DocumentHighlightKind.Text}}))]}}))}))},t}(l);t.OccurrencesAdapter=h;var m=function(e){function t(t,n){var r=e.call(this,n)||this;return r._libFiles=t,r}return __extends(t,e),t.prototype.provideDefinition=function(e,t,r){return __awaiter(this,void 0,void 0,(function(){var r,o,s,a,l,u,c,d,p,g,f,b;return __generator(this,(function(h){switch(h.label){case 0:return r=e.uri,o=e.getOffsetAt(t),[4,this._worker(r)];case 1:return s=h.sent(),e.isDisposed()?[2]:[4,s.getDefinitionAtPosition(r.toString(),o)];case 2:return!(a=h.sent())||e.isDisposed()?[2]:[4,this._libFiles.fetchLibFilesIfNecessary(a.map((function(e){return i.Uri.parse(e.fileName)})))];case 3:if(h.sent(),e.isDisposed())return[2];for(l=[],u=0,c=a;u<c.length;u++)if(d=c[u],p=i.Uri.parse(d.fileName),g=this._libFiles.getOrCreateModel(p))l.push({uri:p,range:this._textSpanToRange(g,d.textSpan)});else if(f=n.getTypeScriptDefault().getExtraLibs()[d.fileName])return b=i.editor.createModel(f.content,"nemotypescript",p),[2,{uri:p,range:this._textSpanToRange(b,d.textSpan)}];return[2,l]}}))}))},t}(l);t.DefinitionAdapter=m;var _=function(e){function t(t,n){var r=e.call(this,n)||this;return r._libFiles=t,r}return __extends(t,e),t.prototype.provideReferences=function(e,t,r,o){return __awaiter(this,void 0,void 0,(function(){var r,o,s,a,l,u,c,d,p,g;return __generator(this,(function(f){switch(f.label){case 0:return r=e.uri,o=e.getOffsetAt(t),[4,this._worker(r)];case 1:return s=f.sent(),e.isDisposed()?[2]:[4,s.getReferencesAtPosition(r.toString(),o)];case 2:return!(a=f.sent())||e.isDisposed()?[2]:[4,this._libFiles.fetchLibFilesIfNecessary(a.map((function(e){return i.Uri.parse(e.fileName)})))];case 3:if(f.sent(),e.isDisposed())return[2];for(l=[],u=0,c=a;u<c.length;u++)d=c[u],p=i.Uri.parse(d.fileName),(g=this._libFiles.getOrCreateModel(p))&&l.push({uri:p,range:this._textSpanToRange(g,d.textSpan)});return n.getTypeScriptDefault().onWillReferences?[2,n.getTypeScriptDefault().onWillReferences(l)]:[2,l]}}))}))},t}(l);t.ReferenceAdapter=_;var v=function(e){function t(t){var r=e.call(this,t)||this;return n.getTypeScriptDefault().getNavigationBarItems=r.getNavigationBarItems.bind(r),n.getTypeScriptDefault().getExportFunctionInfo=r.getExportFunctionInfo.bind(r),r}return __extends(t,e),t.prototype.provideDocumentSymbols=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,r,o,s,a=this;return __generator(this,(function(l){switch(l.label){case 0:return t=e.uri,[4,this._worker(t)];case 1:return n=l.sent(),e.isDisposed()?[2]:[4,n.getNavigationBarItems(t.toString())];case 2:return!(r=l.sent())||e.isDisposed()?[2]:(o=function(t,n,r){var s={name:n.text,detail:"",kind:y[n.kind]||i.languages.SymbolKind.Variable,range:a._textSpanToRange(e,n.spans[0]),selectionRange:a._textSpanToRange(e,n.spans[0]),tags:[],containerName:r};if(n.childItems&&n.childItems.length>0)for(var l=0,u=n.childItems;l<u.length;l++){var c=u[l];o(t,c,s.name)}t.push(s)},s=[],r.forEach((function(e){return o(s,e)})),[2,s])}}))}))},t.prototype.getNavigationBarItems=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,r;return __generator(this,(function(i){switch(i.label){case 0:return t=e.uri,[4,this._worker(t)];case 1:return n=i.sent(),e.isDisposed()?[2]:[4,n.getNavigationBarItems(t.toString())];case 2:return!(r=i.sent())||e.isDisposed()?[2]:[2,r]}}))}))},t.prototype.getExportFunctionInfo=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n,r,i,o,s=this;return __generator(this,(function(a){switch(a.label){case 0:return t=e.uri,[4,this._worker(t)];case 1:return n=a.sent(),e.isDisposed()?[2,{}]:[4,n.getExportFunctionInfo(t.toString())];case 2:return r=a.sent(),i={},[4,n.getNavigationBarItems(t.toString())];case 3:return o=a.sent(),Object.keys(r).forEach((function(t){var n=r[t],a=n.content,l=(n.pos,o.filter((function(e){return e.text===t&&"function"===e.kind&&"export"===e.kindModifiers}))[0]);i[t]={content:a,range:s._textSpanToRange(e,l.spans[0])}})),[2,i]}}))}))},t}(l);t.OutlineAdapter=v;var S=function(){function e(){}return e.unknown="",e.keyword="keyword",e.script="script",e.module="module",e.class="class",e.interface="interface",e.type="type",e.enum="enum",e.variable="var",e.localVariable="local var",e.function="function",e.localFunction="local function",e.memberFunction="method",e.memberGetAccessor="getter",e.memberSetAccessor="setter",e.memberVariable="property",e.constructorImplementation="constructor",e.callSignature="call",e.indexSignature="index",e.constructSignature="construct",e.parameter="parameter",e.typeParameter="type parameter",e.primitiveType="primitive type",e.label="label",e.alias="alias",e.const="const",e.let="let",e.warning="warning",e}();t.Kind=S;var y=Object.create(null);y[S.module]=i.languages.SymbolKind.Module,y[S.class]=i.languages.SymbolKind.Class,y[S.enum]=i.languages.SymbolKind.Enum,y[S.interface]=i.languages.SymbolKind.Interface,y[S.memberFunction]=i.languages.SymbolKind.Method,y[S.memberVariable]=i.languages.SymbolKind.Property,y[S.memberGetAccessor]=i.languages.SymbolKind.Property,y[S.memberSetAccessor]=i.languages.SymbolKind.Property,y[S.variable]=i.languages.SymbolKind.Variable,y[S.const]=i.languages.SymbolKind.Variable,y[S.localVariable]=i.languages.SymbolKind.Variable,y[S.variable]=i.languages.SymbolKind.Variable,y[S.function]=i.languages.SymbolKind.Function,y[S.localFunction]=i.languages.SymbolKind.Function;var w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t._convertOptions=function(e){return{ConvertTabsToSpaces:e.insertSpaces,TabSize:e.tabSize,IndentSize:e.tabSize,IndentStyle:o.Smart,NewLineCharacter:"\n",InsertSpaceAfterCommaDelimiter:!0,InsertSpaceAfterSemicolonInForStatements:!0,InsertSpaceBeforeAndAfterBinaryOperators:!0,InsertSpaceAfterKeywordsInControlFlowStatements:!0,InsertSpaceAfterFunctionKeywordForAnonymousFunctions:!0,InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,PlaceOpenBraceOnNewLineForControlBlocks:!1,PlaceOpenBraceOnNewLineForFunctions:!1}},t.prototype._convertTextChanges=function(e,t){return{text:t.newText,range:this._textSpanToRange(e,t.span)}},t}(l);t.FormatHelper=w;var F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.provideDocumentRangeFormattingEdits=function(e,t,n,r){return __awaiter(this,void 0,void 0,(function(){var r,i,o,s,a,l=this;return __generator(this,(function(u){switch(u.label){case 0:return r=e.uri,i=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),o=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),[4,this._worker(r)];case 1:return s=u.sent(),e.isDisposed()?[2]:[4,s.getFormattingEditsForRange(r.toString(),i,o,w._convertOptions(n))];case 2:return!(a=u.sent())||e.isDisposed()?[2]:[2,a.map((function(t){return l._convertTextChanges(e,t)}))]}}))}))},t}(w);t.FormatAdapter=F;var x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"autoFormatTriggerCharacters",{get:function(){return[";","}","\n"]},enumerable:!1,configurable:!0}),t.prototype.provideOnTypeFormattingEdits=function(e,t,n,r,i){return __awaiter(this,void 0,void 0,(function(){var i,o,s,a,l=this;return __generator(this,(function(u){switch(u.label){case 0:return i=e.uri,o=e.getOffsetAt(t),[4,this._worker(i)];case 1:return s=u.sent(),e.isDisposed()?[2]:[4,s.getFormattingEditsAfterKeystroke(i.toString(),o,n,w._convertOptions(r))];case 2:return!(a=u.sent())||e.isDisposed()?[2]:[2,a.map((function(t){return l._convertTextChanges(e,t)}))]}}))}))},t}(w);t.FormatOnTypeAdapter=x;var k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.provideCodeActions=function(e,t,n,r){return __awaiter(this,void 0,void 0,(function(){var r,i,o,s,a,l,u,c=this;return __generator(this,(function(d){switch(d.label){case 0:return r=e.uri,i=e.getOffsetAt({lineNumber:t.startLineNumber,column:t.startColumn}),o=e.getOffsetAt({lineNumber:t.endLineNumber,column:t.endColumn}),s=w._convertOptions(e.getOptions()),a=n.markers.filter((function(e){return e.code})).map((function(e){return e.code})).map(Number),[4,this._worker(r)];case 1:return l=d.sent(),e.isDisposed()?[2]:[4,l.getCodeFixesAtPosition(r.toString(),i,o,a,s)];case 2:return!(u=d.sent())||e.isDisposed()?[2,{actions:[],dispose:function(){}}]:[2,{actions:u.filter((function(e){return 0===e.changes.filter((function(e){return e.isNewFile})).length})).map((function(t){return c._tsCodeFixActionToMonacoCodeAction(e,n,t)})),dispose:function(){}}]}}))}))},t.prototype._tsCodeFixActionToMonacoCodeAction=function(e,t,n){for(var r=[],i=0,o=n.changes;i<o.length;i++)for(var s=0,a=o[i].textChanges;s<a.length;s++){var l=a[s];r.push({resource:e.uri,edit:{range:this._textSpanToRange(e,l.span),text:l.newText}})}return{title:n.description,edit:{edits:r},diagnostics:t.markers,kind:"quickfix"}},t}(w);function A(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}t.CodeActionAdaptor=k,t.isObject=A;var D=function(e){function t(t){var r=e.call(this,t)||this;return n.getTypeScriptDefault().manualRename=r.manualRename.bind(r),r}return __extends(t,e),t.prototype.provideRenameEdits=function(e,t,r){return __awaiter(this,void 0,void 0,(function(){var o,s,a,l,u,c,d,p,g,f,b,h;return __generator(this,(function(m){switch(m.label){case 0:return o=e.uri,s=o.toString(),a=e.getOffsetAt(t),[4,this._worker(o)];case 1:return l=m.sent(),e.isDisposed()?[2]:[4,l.getRenameInfo(s,a,{allowRenameOfImportPath:!1})];case 2:if(!1===(u=m.sent()).canRename)return[2,{edits:[],rejectReason:u.localizedErrorMessage}];if(void 0!==u.fileToRename)throw new Error("Renaming files is not supported.");return[4,l.findRenameLocations(s,a,!1,!1,!1)];case 3:if(!(c=m.sent())||e.isDisposed())return[2];for(d=[],p=0,g=c;p<g.length;p++){if(f=g[p],b=i.Uri.parse(f.fileName),!(h=i.editor.getModel(b)))throw new Error("Unknown URI "+b+".");d.push({resource:b,edit:{range:this._textSpanToRange(h,f.textSpan),text:r}})}return n.getTypeScriptDefault().onWillRename?[2,{edits:n.getTypeScriptDefault().onWillRename(d)}]:[2,{edits:d}]}}))}))},t.prototype.manualRename=function(e,t,n){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(o){switch(o.label){case 0:return[4,this.provideRenameEdits(e,t,n)];case 1:return(r=o.sent())&&r.edits.forEach((function(e){if(!(A(t=e)&&i.Uri.isUri(t.resource)&&A(t.edit)))throw new Error("Unknown Edit "+e+".");var t,n=i.editor.getModel(e.resource);if(!n)throw new Error("Unknown Edit "+e+".");n.pushEditOperations(null,[e.edit],(function(){return[]}))})),[2]}}))}))},t}(l);t.RenameAdapter=D})),define("vs/language/nemotypescript/tsMode",["require","exports","./workerManager","./languageFeatures","./fillers/monaco-editor"],(function(e,t,n,r,i){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),t.getTypeScriptWorker=t.setupTypeScript=void 0,t.setupTypeScript=function(e){o=function(e,t){var o=new n.WorkerManager(t,e),s=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.getLanguageServiceWorker.apply(o,e)},a=new r.LibFiles(s);return i.languages.registerCompletionItemProvider(t,new r.SuggestAdapter(s)),i.languages.registerSignatureHelpProvider(t,new r.SignatureHelpAdapter(s)),i.languages.registerHoverProvider(t,new r.QuickInfoAdapter(s)),i.languages.registerDocumentHighlightProvider(t,new r.OccurrencesAdapter(s)),i.languages.registerDefinitionProvider(t,new r.DefinitionAdapter(a,s)),i.languages.registerReferenceProvider(t,new r.ReferenceAdapter(a,s)),i.languages.registerDocumentSymbolProvider(t,new r.OutlineAdapter(s)),i.languages.registerDocumentRangeFormattingEditProvider(t,new r.FormatAdapter(s)),i.languages.registerOnTypeFormattingEditProvider(t,new r.FormatOnTypeAdapter(s)),i.languages.registerCodeActionProvider(t,new r.CodeActionAdaptor(s)),i.languages.registerRenameProvider(t,new r.RenameAdapter(s)),new r.DiagnosticsAdapter(a,e,t,s),s}(e,"nemotypescript")},t.getTypeScriptWorker=function(){return new Promise((function(e,t){if(!o)return t("TypeScript not registered!");e(o)}))}})); |
@@ -214,2 +214,6 @@ /*--------------------------------------------------------------------------------------------- | ||
/** | ||
* manually do rename | ||
*/ | ||
manualRename?: (model: editor.ITextModel, position: Position, newName: string) => Promise<void>; | ||
/** | ||
* Event fired before reference apply | ||
@@ -216,0 +220,0 @@ */ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26213566
14107