本文整理匯總了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);
}
示例2: _addSuggestionsAtPosition
suggest: (resource, position) => {
let model = modelService.getModel(resource);
let result = _addSuggestionsAtPosition(model, position, predefined, null);
return TPromise.as(result);
}
示例3:
}).returns(() => TPromise.as(true));
示例4:
var factory = () => {
return TPromise.as(++count);
};
示例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)]));
});
示例6:
readExtensionPointContributions<T>(extPoint: IExtensionPoint<T>): TPromise<ExtensionPointContribution<T>[]> {
return TPromise.as([]);
}
示例7: resolveStat
protected resolveStat(resource: URI): TPromise<IStat> {
return TPromise.as({
resource: resource,
isDirectory: false
});
}
示例8:
$tryApplyWorkspaceEdit(_workspaceResourceEdits: IWorkspaceResourceEdit[]): TPromise<boolean> {
workspaceResourceEdits = _workspaceResourceEdits;
return TPromise.as(true);
}
示例9: run
public run(accessor: ServicesAccessor, editor: ICodeEditor): TPromise<void> {
const quickOpenService = accessor.get(IQuickOpenService);
quickOpenService.show(EMMET_COMMANDS_PREFIX);
return TPromise.as(null);
}
示例10:
getBackupPath: () => TPromise.as(workspaceBackupPath)