mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
make session provider generic to make it more obvious that it is "instance-true" (#178660)
This commit is contained in:
parent
95917c1376
commit
882f699c66
10
src/vscode-dts/vscode.proposed.interactive.d.ts
vendored
10
src/vscode-dts/vscode.proposed.interactive.d.ts
vendored
|
@ -54,18 +54,18 @@ declare module 'vscode' {
|
|||
action?: string;
|
||||
}
|
||||
|
||||
export interface InteractiveEditorSessionProvider {
|
||||
export interface InteractiveEditorSessionProvider<S extends InteractiveEditorSession = InteractiveEditorSession, R extends InteractiveEditorResponse | InteractiveEditorMessageResponse = InteractiveEditorResponse | InteractiveEditorMessageResponse> {
|
||||
// Create a session. The lifetime of this session is the duration of the editing session with the input mode widget.
|
||||
prepareInteractiveEditorSession(context: TextDocumentContext, token: CancellationToken): ProviderResult<InteractiveEditorSession>;
|
||||
prepareInteractiveEditorSession(context: TextDocumentContext, token: CancellationToken): ProviderResult<S>;
|
||||
|
||||
provideInteractiveEditorResponse(request: InteractiveEditorRequest, token: CancellationToken): ProviderResult<InteractiveEditorResponse | InteractiveEditorMessageResponse>;
|
||||
provideInteractiveEditorResponse(request: InteractiveEditorRequest, token: CancellationToken): ProviderResult<R>;
|
||||
|
||||
// eslint-disable-next-line local/vscode-dts-provider-naming
|
||||
releaseInteractiveEditorSession?(session: InteractiveEditorSession): any;
|
||||
releaseInteractiveEditorSession?(session: S): any;
|
||||
|
||||
// todo@API use enum instead of boolean
|
||||
// eslint-disable-next-line local/vscode-dts-provider-naming
|
||||
handleInteractiveEditorResponseFeedback?(session: InteractiveEditorSession, response: InteractiveEditorResponse | InteractiveEditorMessageResponse, kind: InteractiveEditorResponseFeedbackKind): void;
|
||||
handleInteractiveEditorResponseFeedback?(session: S, response: R, kind: InteractiveEditorResponseFeedbackKind): void;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue