本文整理汇总了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)