finalize CancellationError API, fixes https://github.com/microsoft/vscode/issues/93686
This commit is contained in:
parent
adb037b74d
commit
152d0ec8f0
3 changed files with 16 additions and 22 deletions
15
src/vs/vscode.d.ts
vendored
15
src/vs/vscode.d.ts
vendored
|
@ -1450,6 +1450,21 @@ declare module 'vscode' {
|
|||
dispose(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* An error type that should be used to signal cancellation of an operation.
|
||||
*
|
||||
* This type can be used in response to a [cancellation token](#CancellationToken)
|
||||
* being cancelled or when an operation is being cancelled by the
|
||||
* executor of that operation.
|
||||
*/
|
||||
export class CancellationError extends Error {
|
||||
|
||||
/**
|
||||
* Creates a new cancellation error.
|
||||
*/
|
||||
constructor();
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a type which can release resources, such
|
||||
* as event listening or a timer.
|
||||
|
|
19
src/vs/vscode.proposed.d.ts
vendored
19
src/vs/vscode.proposed.d.ts
vendored
|
@ -16,25 +16,6 @@
|
|||
|
||||
declare module 'vscode' {
|
||||
|
||||
//#region https://github.com/microsoft/vscode/issues/93686
|
||||
|
||||
/**
|
||||
* An error type should be used to signal cancellation of an operation.
|
||||
*
|
||||
* This type can be used in response to a cancellation token or when an
|
||||
* operation is being cancelled by the executor of that operation.
|
||||
*/
|
||||
export class CancellationError extends Error {
|
||||
|
||||
/**
|
||||
* Creates a new cancellation error.
|
||||
*/
|
||||
constructor();
|
||||
}
|
||||
|
||||
|
||||
//#endregion
|
||||
|
||||
// #region auth provider: https://github.com/microsoft/vscode/issues/88309
|
||||
|
||||
/**
|
||||
|
|
|
@ -1092,6 +1092,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
|||
CallHierarchyIncomingCall: extHostTypes.CallHierarchyIncomingCall,
|
||||
CallHierarchyItem: extHostTypes.CallHierarchyItem,
|
||||
CallHierarchyOutgoingCall: extHostTypes.CallHierarchyOutgoingCall,
|
||||
CancellationError: errors.CancellationError,
|
||||
CancellationTokenSource: CancellationTokenSource,
|
||||
CodeAction: extHostTypes.CodeAction,
|
||||
CodeActionKind: extHostTypes.CodeActionKind,
|
||||
|
@ -1190,9 +1191,6 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
|||
ViewColumn: extHostTypes.ViewColumn,
|
||||
WorkspaceEdit: extHostTypes.WorkspaceEdit,
|
||||
// proposed api types
|
||||
get CancellationError() {
|
||||
return errors.CancellationError;
|
||||
},
|
||||
get RemoteAuthorityResolverError() {
|
||||
// checkProposedApiEnabled(extension);
|
||||
return extHostTypes.RemoteAuthorityResolverError;
|
||||
|
|
Loading…
Reference in a new issue