當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript base.TPromise.as方法代碼示例

本文整理匯總了TypeScript中vs/base/common/winjs.base.TPromise.as方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript base.TPromise.as方法的具體用法?TypeScript base.TPromise.as怎麽用?TypeScript base.TPromise.as使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在vs/base/common/winjs.base.TPromise的用法示例。


在下文中一共展示了base.TPromise.as方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: publicLog

	publicLog(eventName: string, data?: any): TPromise<void> {
		data = data || Object.create(null);
		data[this._name] = true;
		this._proxy.$publicLog(eventName, data);
		return TPromise.as(null);
	}
開發者ID:Ayush-Mahajan,項目名稱:vscode,代碼行數:6,代碼來源:extHostTelemetry.ts

示例2: _addSuggestionsAtPosition

			suggest: (resource, position) => {
				let model = modelService.getModel(resource);
				let result = _addSuggestionsAtPosition(model, position, predefined, null);
				return TPromise.as(result);
			}
開發者ID:13572293130,項目名稱:vscode,代碼行數:5,代碼來源:suggestSupport.ts

示例3:

		}).returns(() => TPromise.as(true));
開發者ID:jumpinjackie,項目名稱:sqlopsstudio,代碼行數:1,代碼來源:objectExplorerService.test.ts

示例4:

		var factory = () => {
			return TPromise.as(++count);
		};
開發者ID:13572293130,項目名稱:vscode,代碼行數:3,代碼來源:async.test.ts

示例5: Position

		let sub = participant.getOnWillSaveTextDocumentEvent(nullExtensionDescription)(function (e) {
			e.waitUntil(TPromise.as([TextEdit.insert(new Position(0, 0), 'bar')]));
			e.waitUntil(TPromise.as([TextEdit.setEndOfLine(EndOfLine.CRLF)]));
		});
開發者ID:servicesgpr,項目名稱:vscode,代碼行數:4,代碼來源:extHostDocumentSaveParticipant.test.ts

示例6:

	readExtensionPointContributions<T>(extPoint: IExtensionPoint<T>): TPromise<ExtensionPointContribution<T>[]> {
		return TPromise.as([]);
	}
開發者ID:StateFarmIns,項目名稱:vscode,代碼行數:3,代碼來源:commandService.test.ts

示例7: resolveStat

	protected resolveStat(resource: URI): TPromise<IStat> {
		return TPromise.as({
			resource: resource,
			isDirectory: false
		});
	}
開發者ID:Abdullah-Mamun,項目名稱:vscode,代碼行數:6,代碼來源:servicesTestUtils.ts

示例8:

			$tryApplyWorkspaceEdit(_workspaceResourceEdits: IWorkspaceResourceEdit[]): TPromise<boolean> {
				workspaceResourceEdits = _workspaceResourceEdits;
				return TPromise.as(true);
			}
開發者ID:servicesgpr,項目名稱:vscode,代碼行數:4,代碼來源:extHostTextEditors.test.ts

示例9: run

	public run(accessor: ServicesAccessor, editor: ICodeEditor): TPromise<void> {
		const quickOpenService = accessor.get(IQuickOpenService);
		quickOpenService.show(EMMET_COMMANDS_PREFIX);
		return TPromise.as(null);
	}
開發者ID:AllureFer,項目名稱:vscode,代碼行數:5,代碼來源:showEmmetCommands.ts

示例10:

			getBackupPath: () => TPromise.as(workspaceBackupPath)
開發者ID:sandy081,項目名稱:vscode,代碼行數:1,代碼來源:backupFileService.test.ts


注:本文中的vs/base/common/winjs.base.TPromise.as方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。