本文整理汇总了TypeScript中vs/base/common/winjs.base.TPromise类的典型用法代码示例。如果您正苦于以下问题:TypeScript base.TPromise类的具体用法?TypeScript base.TPromise怎么用?TypeScript base.TPromise使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了base.TPromise类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
}, (err) => {
this._proxy.$setError(err);
return TPromise.wrapError(err);
});
示例2: stage
public stage(filePath: string, content: string): TPromise<IRawStatus> {
return this.raw.then(raw => raw.stage(filePath, content));
}
示例3: checkout
public checkout(treeish?: string, filePaths?: string[]): TPromise<IRawStatus> {
return this.raw.then(raw => raw.checkout(treeish, filePaths));
}
示例4: serviceState
public serviceState(): TPromise<RawServiceState> {
return this.raw.then(raw => raw.serviceState());
}
示例5: init
public init(): TPromise<IRawStatus> {
return this.raw.then(raw => raw.init());
}
示例6: setInput
/**
* Note: Clients should not call this method, the workbench calls this
* method. Calling it otherwise may result in unexpected behavior.
*
* Sets the given input with the options to the part. An editor has to deal with the
* situation that the same input is being set with different options.
*/
public setInput(input: EditorInput, options?: EditorOptions): TPromise<void> {
this._input = input;
this._options = options;
return TPromise.wrap<void>(null);
}
示例7:
}, (err) => {
actionInstance.dispose();
return TPromise.wrapError(err);
});
示例8: executeCommand
executeCommand(id: string, ...args: any[]): TPromise<any> {
lastCommand = { id, args };
return TPromise.as(undefined);
}
示例9:
instantiationService.stub(IExtensionService, {}, 'whenInstalledExtensionsRegistered', () => TPromise.as(null));