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.
1 line
15 KiB
1 line
15 KiB
5 years ago
|
webpackJsonp([178],{3531:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupTypeScript=function(e){o=s(e,"typescript")},t.setupJavaScript=function(e){r=s(e,"javascript")},t.getJavaScriptWorker=function(){return new monaco.Promise(function(e,t){if(!r)return t("JavaScript not registered!");e(r)})},t.getTypeScriptWorker=function(){return new monaco.Promise(function(e,t){if(!o)return t("TypeScript not registered!");e(o)})};var r,o,i=n(3532),a=n(3533);function s(e,t){function n(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return r.getLanguageServiceWorker.apply(r,[e].concat(t))}var r=new i.a(t,e);return monaco.languages.registerCompletionItemProvider(t,new a.j(n)),monaco.languages.registerSignatureHelpProvider(t,new a.i(n)),monaco.languages.registerHoverProvider(t,new a.g(n)),monaco.languages.registerDocumentHighlightProvider(t,new a.e(n)),monaco.languages.registerDefinitionProvider(t,new a.a(n)),monaco.languages.registerReferenceProvider(t,new a.h(n)),monaco.languages.registerDocumentSymbolProvider(t,new a.f(n)),monaco.languages.registerDocumentRangeFormattingEditProvider(t,new a.c(n)),monaco.languages.registerOnTypeFormattingEditProvider(t,new a.d(n)),new a.b(e,t,n),n}},3532:function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=(o.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},o.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},o.prototype._checkIfIdle=function(){if(this._worker){var e=this._defaults.getWorkerMaxIdleTime(),t=Date.now()-this._lastUsedTime;0<e&&e<t&&this._stopWorker()}},o.prototype._getClient=function(){var t=this;if(this._lastUsedTime=Date.now(),!this._client){this._worker=monaco.editor.createWebWorker({moduleId:"vs/language/typescript/tsWorker",label:this._modeId,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs()}});var e=this._worker.getProxy();this._defaults.getEagerModelSync()&&(e=e.then(function(e){return t._worker.withSyncedResources(monaco.editor.getModels().filter(function(e){return e.getModeId()===t._modeId}).map(function(e){return e.uri}))})),this._client=e}return this._client},o.prototype.getLanguageServiceWorker=function(){for(var t,n=this,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return this._getClient().then(function(e){t=e}).then(function(e){return n._worker.withSyncedResources(r)}).then(function(e){return t})},o);function o(e,t){var n=this;this._modeId=e,this._defaults=t,this._worker=null,this._idleCheckInterval=setInterval(function(){return n._checkIfIdle()},3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return n._stopWorker()})}},3533:function(e,t,n){"use strict";n.d(t,"b",function(){return g}),n.d(t,"j",function(){return h}),n.d(t,"i",function(){return y}),n.d(t,"g",function(){return k}),n.d(t,"e",function(){return I}),n.d(t,"a",function(){return x}),n.d(t,"h",function(){return D}),n.d(t,"f",function(){return F}),n.d(t,"c",function(){return H}),n.d(t,"d",function(){return J});var r,o,i,a=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=monaco.Uri,u=monaco.Promise;function c(e){return e?e.map(function(e){return e.text}).join(""):""}(i=o=o||{})[i.None=0]="None",i[i.Block=1]="Block",i[i.Smart=2]="Smart";var l=(p.prototype._positionToOffset=function(e,t){return monaco.editor.getModel(e).getOffsetAt(t)},p.prototype._offsetToPosition=function(e,t){return monaco.editor.getModel(e).getPositionAt(t)},p.prototype._textSpanToRange=function(e,t){var n=this._offsetToPosition(e,t.start),r=this._offsetToPosition(e,t.start+t.length);return{startLineNumber:n.lineNumber,startColumn:n.column,endLineNumber:r.lineNumber,endColumn:r.
|