Skip to content

Commit

Permalink
Constrain types of providers
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbvz committed Jun 23, 2020
1 parent 69f3921 commit 876ea86
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/vs/vscode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2304,7 +2304,7 @@ declare module 'vscode' {
* A code lens provider adds [commands](#Command) to source text. The commands will be shown
* as dedicated horizontal lines in between the source text.
*/
export interface CodeLensProvider<T = CodeLens> {
export interface CodeLensProvider<T extends CodeLens = CodeLens> {

/**
* An optional event to signal that the code lenses from this provider have changed.
Expand Down Expand Up @@ -2836,7 +2836,7 @@ declare module 'vscode' {
* The workspace symbol provider interface defines the contract between extensions and
* the [symbol search](https://code.visualstudio.com/docs/editor/editingevolved#_open-symbol-by-name)-feature.
*/
export interface WorkspaceSymbolProvider<T = SymbolInformation> {
export interface WorkspaceSymbolProvider<T extends SymbolInformation = SymbolInformation> {

/**
* Project-wide search for a symbol matching the given query string.
Expand Down Expand Up @@ -3895,7 +3895,7 @@ declare module 'vscode' {
* Represents a collection of [completion items](#CompletionItem) to be presented
* in the editor.
*/
export class CompletionList<T = CompletionItem> {
export class CompletionList<T extends CompletionItem = CompletionItem> {

/**
* This list is not complete. Further typing should result in recomputing
Expand Down Expand Up @@ -3968,7 +3968,7 @@ declare module 'vscode' {
* Providers are asked for completions either explicitly by a user gesture or -depending on the configuration-
* implicitly when typing words or trigger characters.
*/
export interface CompletionItemProvider<T = CompletionItem> {
export interface CompletionItemProvider<T extends CompletionItem = CompletionItem> {

/**
* Provide completion items for the given position and document.
Expand Down Expand Up @@ -4043,7 +4043,7 @@ declare module 'vscode' {
* The document link provider defines the contract between extensions and feature of showing
* links in the editor.
*/
export interface DocumentLinkProvider<T = DocumentLink> {
export interface DocumentLinkProvider<T extends DocumentLink = DocumentLink> {

/**
* Provide links for the given document. Note that the editor ships with a default provider that detects
Expand Down Expand Up @@ -6106,7 +6106,7 @@ declare module 'vscode' {
* A task provider allows to add tasks to the task service.
* A task provider is registered via #tasks.registerTaskProvider.
*/
export interface TaskProvider<T = Task> {
export interface TaskProvider<T extends Task = Task> {
/**
* Provides tasks.
* @param token A cancellation token.
Expand Down

0 comments on commit 876ea86

Please sign in to comment.