本文整理匯總了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));