@@ -9,8 +9,8 @@ import { workspace, Disposable, WorkspaceFolder as VWorkspaceFolder, WorkspaceFo
9
9
10
10
import { DynamicFeature , RegistrationData , BaseLanguageClient , NextSignature } from './client' ;
11
11
import {
12
- ClientCapabilities , InitializeParams , MessageSignature , CancellationToken , ServerCapabilities , WorkspaceFoldersRequest , WorkspaceFolder ,
13
- DidChangeWorkspaceFoldersNotification , DidChangeWorkspaceFoldersParams
12
+ ClientCapabilities , InitializeParams , CancellationToken , ServerCapabilities , WorkspaceFoldersRequest , WorkspaceFolder ,
13
+ DidChangeWorkspaceFoldersNotification , DidChangeWorkspaceFoldersParams , RegistrationType
14
14
} from 'vscode-languageserver-protocol' ;
15
15
16
16
function access < T , K extends keyof T > ( target : T | undefined , key : K ) : T [ K ] | undefined {
@@ -37,7 +37,7 @@ export class WorkspaceFoldersFeature implements DynamicFeature<undefined> {
37
37
constructor ( private _client : BaseLanguageClient ) {
38
38
}
39
39
40
- public get messages ( ) : MessageSignature {
40
+ public get registrationType ( ) : RegistrationType < undefined > {
41
41
return DidChangeWorkspaceFoldersNotification . type ;
42
42
}
43
43
@@ -87,10 +87,7 @@ export class WorkspaceFoldersFeature implements DynamicFeature<undefined> {
87
87
id = UUID . generateUuid ( ) ;
88
88
}
89
89
if ( id ) {
90
- this . register ( this . messages , {
91
- id : id ,
92
- registerOptions : undefined
93
- } ) ;
90
+ this . register ( { id : id , registerOptions : undefined } ) ;
94
91
}
95
92
}
96
93
@@ -118,7 +115,7 @@ export class WorkspaceFoldersFeature implements DynamicFeature<undefined> {
118
115
this . _client . sendNotification ( DidChangeWorkspaceFoldersNotification . type , params ) ;
119
116
}
120
117
121
- public register ( _message : MessageSignature , data : RegistrationData < undefined > ) : void {
118
+ public register ( data : RegistrationData < undefined > ) : void {
122
119
let id = data . id ;
123
120
let client = this . _client ;
124
121
let disposable = workspace . onDidChangeWorkspaceFolders ( ( event ) => {
0 commit comments