@@ -69,7 +69,8 @@ declare namespace ts {
69
69
pos : number ;
70
70
end : number ;
71
71
}
72
- type JsDocSyntaxKind = SyntaxKind . EndOfFileToken | SyntaxKind . WhitespaceTrivia | SyntaxKind . AtToken | SyntaxKind . NewLineTrivia | SyntaxKind . AsteriskToken | SyntaxKind . OpenBraceToken | SyntaxKind . CloseBraceToken | SyntaxKind . LessThanToken | SyntaxKind . OpenBracketToken | SyntaxKind . CloseBracketToken | SyntaxKind . EqualsToken | SyntaxKind . CommaToken | SyntaxKind . DotToken | SyntaxKind . Identifier | SyntaxKind . NoSubstitutionTemplateLiteral | SyntaxKind . Unknown ;
72
+ type JsDocSyntaxKind = SyntaxKind . EndOfFileToken | SyntaxKind . WhitespaceTrivia | SyntaxKind . AtToken | SyntaxKind . NewLineTrivia | SyntaxKind . AsteriskToken | SyntaxKind . OpenBraceToken | SyntaxKind . CloseBraceToken | SyntaxKind . LessThanToken | SyntaxKind . OpenBracketToken | SyntaxKind . CloseBracketToken | SyntaxKind . EqualsToken | SyntaxKind . CommaToken | SyntaxKind . DotToken | SyntaxKind . Identifier | SyntaxKind . NoSubstitutionTemplateLiteral | SyntaxKind . Unknown | KeywordSyntaxKind ;
73
+ type KeywordSyntaxKind = SyntaxKind . AbstractKeyword | SyntaxKind . AnyKeyword | SyntaxKind . AsKeyword | SyntaxKind . BooleanKeyword | SyntaxKind . BreakKeyword | SyntaxKind . CaseKeyword | SyntaxKind . CatchKeyword | SyntaxKind . ClassKeyword | SyntaxKind . ContinueKeyword | SyntaxKind . ConstKeyword | SyntaxKind . ConstructorKeyword | SyntaxKind . DebuggerKeyword | SyntaxKind . DeclareKeyword | SyntaxKind . DefaultKeyword | SyntaxKind . DeleteKeyword | SyntaxKind . DoKeyword | SyntaxKind . ElseKeyword | SyntaxKind . EnumKeyword | SyntaxKind . ExportKeyword | SyntaxKind . ExtendsKeyword | SyntaxKind . FalseKeyword | SyntaxKind . FinallyKeyword | SyntaxKind . ForKeyword | SyntaxKind . FromKeyword | SyntaxKind . FunctionKeyword | SyntaxKind . GetKeyword | SyntaxKind . IfKeyword | SyntaxKind . ImplementsKeyword | SyntaxKind . ImportKeyword | SyntaxKind . InKeyword | SyntaxKind . InferKeyword | SyntaxKind . InstanceOfKeyword | SyntaxKind . InterfaceKeyword | SyntaxKind . IsKeyword | SyntaxKind . KeyOfKeyword | SyntaxKind . LetKeyword | SyntaxKind . ModuleKeyword | SyntaxKind . NamespaceKeyword | SyntaxKind . NeverKeyword | SyntaxKind . NewKeyword | SyntaxKind . NullKeyword | SyntaxKind . NumberKeyword | SyntaxKind . ObjectKeyword | SyntaxKind . PackageKeyword | SyntaxKind . PrivateKeyword | SyntaxKind . ProtectedKeyword | SyntaxKind . PublicKeyword | SyntaxKind . ReadonlyKeyword | SyntaxKind . RequireKeyword | SyntaxKind . GlobalKeyword | SyntaxKind . ReturnKeyword | SyntaxKind . SetKeyword | SyntaxKind . StaticKeyword | SyntaxKind . StringKeyword | SyntaxKind . SuperKeyword | SyntaxKind . SwitchKeyword | SyntaxKind . SymbolKeyword | SyntaxKind . ThisKeyword | SyntaxKind . ThrowKeyword | SyntaxKind . TrueKeyword | SyntaxKind . TryKeyword | SyntaxKind . TypeKeyword | SyntaxKind . TypeOfKeyword | SyntaxKind . UndefinedKeyword | SyntaxKind . UniqueKeyword | SyntaxKind . UnknownKeyword | SyntaxKind . VarKeyword | SyntaxKind . VoidKeyword | SyntaxKind . WhileKeyword | SyntaxKind . WithKeyword | SyntaxKind . YieldKeyword | SyntaxKind . AsyncKeyword | SyntaxKind . AwaitKeyword | SyntaxKind . OfKeyword ;
73
74
type JsxTokenSyntaxKind = SyntaxKind . LessThanSlashToken | SyntaxKind . EndOfFileToken | SyntaxKind . ConflictMarkerTrivia | SyntaxKind . JsxText | SyntaxKind . JsxTextAllWhiteSpaces | SyntaxKind . OpenBraceToken | SyntaxKind . LessThanToken ;
74
75
enum SyntaxKind {
75
76
Unknown = 0 ,
@@ -5672,7 +5673,8 @@ declare namespace ts.server.protocol {
5672
5673
GetApplicableRefactors = "getApplicableRefactors" ,
5673
5674
GetEditsForRefactor = "getEditsForRefactor" ,
5674
5675
OrganizeImports = "organizeImports" ,
5675
- GetEditsForFileRename = "getEditsForFileRename"
5676
+ GetEditsForFileRename = "getEditsForFileRename" ,
5677
+ ConfigurePlugin = "configurePlugin"
5676
5678
}
5677
5679
/**
5678
5680
* A TypeScript Server message
@@ -6617,6 +6619,14 @@ declare namespace ts.server.protocol {
6617
6619
*/
6618
6620
interface ConfigureResponse extends Response {
6619
6621
}
6622
+ interface ConfigurePluginRequestArguments {
6623
+ pluginName : string ;
6624
+ configuration : any ;
6625
+ }
6626
+ interface ConfigurePluginRequest extends Request {
6627
+ command : CommandTypes . ConfigurePlugin ;
6628
+ arguments : ConfigurePluginRequestArguments ;
6629
+ }
6620
6630
/**
6621
6631
* Information found in an "open" request.
6622
6632
*/
@@ -8043,6 +8053,11 @@ declare namespace ts.server {
8043
8053
interface PluginModule {
8044
8054
create ( createInfo : PluginCreateInfo ) : LanguageService ;
8045
8055
getExternalFiles ?( proj : Project ) : string [ ] ;
8056
+ onConfigurationChanged ?( config : any ) : void ;
8057
+ }
8058
+ interface PluginModuleWithName {
8059
+ name : string ;
8060
+ module : PluginModule ;
8046
8061
}
8047
8062
type PluginModuleFactory = ( mod : {
8048
8063
typescript : typeof ts ;
@@ -8181,11 +8196,11 @@ declare namespace ts.server {
8181
8196
filesToString ( writeProjectFileNames : boolean ) : string ;
8182
8197
setCompilerOptions ( compilerOptions : CompilerOptions ) : void ;
8183
8198
protected removeRoot ( info : ScriptInfo ) : void ;
8184
- protected enableGlobalPlugins ( options : CompilerOptions ) : void ;
8185
- protected enablePlugin ( pluginConfigEntry : PluginImport , searchPaths : string [ ] ) : void ;
8199
+ protected enableGlobalPlugins ( options : CompilerOptions , pluginConfigOverrides : Map < any > | undefined ) : void ;
8200
+ protected enablePlugin ( pluginConfigEntry : PluginImport , searchPaths : string [ ] , pluginConfigOverrides : Map < any > | undefined ) : void ;
8201
+ private enableProxy ;
8186
8202
/** Starts a new check for diagnostics. Call this if some file has updated that would cause diagnostics to be changed. */
8187
8203
refreshDiagnostics ( ) : void ;
8188
- private enableProxy ;
8189
8204
}
8190
8205
/**
8191
8206
* If a file is opened and no tsconfig (or jsconfig) is found,
@@ -8226,7 +8241,6 @@ declare namespace ts.server {
8226
8241
getConfigFilePath ( ) : NormalizedPath ;
8227
8242
getProjectReferences ( ) : ReadonlyArray < ProjectReference > ;
8228
8243
updateReferences ( refs : ReadonlyArray < ProjectReference > | undefined ) : void ;
8229
- enablePlugins ( ) : void ;
8230
8244
/**
8231
8245
* Get the errors that dont have any file name associated
8232
8246
*/
@@ -8471,6 +8485,7 @@ declare namespace ts.server {
8471
8485
readonly globalPlugins : ReadonlyArray < string > ;
8472
8486
readonly pluginProbeLocations : ReadonlyArray < string > ;
8473
8487
readonly allowLocalPluginLoads : boolean ;
8488
+ private currentPluginConfigOverrides ;
8474
8489
readonly typesMapLocation : string | undefined ;
8475
8490
readonly syntaxOnly ?: boolean ;
8476
8491
/** Tracks projects that we have already sent telemetry for. */
@@ -8646,6 +8661,7 @@ declare namespace ts.server {
8646
8661
applySafeList ( proj : protocol . ExternalProject ) : NormalizedPath [ ] ;
8647
8662
openExternalProject ( proj : protocol . ExternalProject ) : void ;
8648
8663
hasDeferredExtension ( ) : boolean ;
8664
+ configurePlugin ( args : protocol . ConfigurePluginRequestArguments ) : void ;
8649
8665
}
8650
8666
}
8651
8667
declare namespace ts . server {
@@ -8816,6 +8832,7 @@ declare namespace ts.server {
8816
8832
private convertTextChangeToCodeEdit ;
8817
8833
private getBraceMatching ;
8818
8834
private getDiagnosticsForProject ;
8835
+ private configurePlugin ;
8819
8836
getCanonicalFileName ( fileName : string ) : string ;
8820
8837
exit ( ) : void ;
8821
8838
private notRequired ;
0 commit comments