@@ -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 ,
@@ -5111,20 +5112,24 @@ declare namespace ts {
5111
5112
documentation ?: SymbolDisplayPart [ ] ;
5112
5113
tags ?: JSDocTagInfo [ ] ;
5113
5114
}
5114
- interface RenameInfo {
5115
- canRename : boolean ;
5115
+ type RenameInfo = RenameInfoSuccess | RenameInfoFailure ;
5116
+ interface RenameInfoSuccess {
5117
+ canRename : true ;
5116
5118
/**
5117
5119
* File or directory to rename.
5118
5120
* If set, `getEditsForFileRename` should be called instead of `findRenameLocations`.
5119
5121
*/
5120
5122
fileToRename ?: string ;
5121
- localizedErrorMessage ?: string ;
5122
5123
displayName : string ;
5123
5124
fullDisplayName : string ;
5124
5125
kind : ScriptElementKind ;
5125
5126
kindModifiers : string ;
5126
5127
triggerSpan : TextSpan ;
5127
5128
}
5129
+ interface RenameInfoFailure {
5130
+ canRename : false ;
5131
+ localizedErrorMessage : string ;
5132
+ }
5128
5133
interface SignatureHelpParameter {
5129
5134
name : string ;
5130
5135
documentation : SymbolDisplayPart [ ] ;
@@ -5668,7 +5673,8 @@ declare namespace ts.server.protocol {
5668
5673
GetApplicableRefactors = "getApplicableRefactors" ,
5669
5674
GetEditsForRefactor = "getEditsForRefactor" ,
5670
5675
OrganizeImports = "organizeImports" ,
5671
- GetEditsForFileRename = "getEditsForFileRename"
5676
+ GetEditsForFileRename = "getEditsForFileRename" ,
5677
+ ConfigurePlugin = "configurePlugin"
5672
5678
}
5673
5679
/**
5674
5680
* A TypeScript Server message
@@ -6434,20 +6440,17 @@ declare namespace ts.server.protocol {
6434
6440
/**
6435
6441
* Information about the item to be renamed.
6436
6442
*/
6437
- interface RenameInfo {
6443
+ type RenameInfo = RenameInfoSuccess | RenameInfoFailure ;
6444
+ interface RenameInfoSuccess {
6438
6445
/**
6439
6446
* True if item can be renamed.
6440
6447
*/
6441
- canRename : boolean ;
6448
+ canRename : true ;
6442
6449
/**
6443
6450
* File or directory to rename.
6444
6451
* If set, `getEditsForFileRename` should be called instead of `findRenameLocations`.
6445
6452
*/
6446
6453
fileToRename ?: string ;
6447
- /**
6448
- * Error message if item can not be renamed.
6449
- */
6450
- localizedErrorMessage ?: string ;
6451
6454
/**
6452
6455
* Display name of the item to be renamed.
6453
6456
*/
@@ -6467,6 +6470,13 @@ declare namespace ts.server.protocol {
6467
6470
/** Span of text to rename. */
6468
6471
triggerSpan : TextSpan ;
6469
6472
}
6473
+ interface RenameInfoFailure {
6474
+ canRename : false ;
6475
+ /**
6476
+ * Error message if item can not be renamed.
6477
+ */
6478
+ localizedErrorMessage : string ;
6479
+ }
6470
6480
/**
6471
6481
* A group of text spans, all in 'file'.
6472
6482
*/
@@ -6609,6 +6619,14 @@ declare namespace ts.server.protocol {
6609
6619
*/
6610
6620
interface ConfigureResponse extends Response {
6611
6621
}
6622
+ interface ConfigurePluginRequestArguments {
6623
+ pluginName : string ;
6624
+ configuration : any ;
6625
+ }
6626
+ interface ConfigurePluginRequest extends Request {
6627
+ command : CommandTypes . ConfigurePlugin ;
6628
+ arguments : ConfigurePluginRequestArguments ;
6629
+ }
6612
6630
/**
6613
6631
* Information found in an "open" request.
6614
6632
*/
@@ -8035,6 +8053,11 @@ declare namespace ts.server {
8035
8053
interface PluginModule {
8036
8054
create ( createInfo : PluginCreateInfo ) : LanguageService ;
8037
8055
getExternalFiles ?( proj : Project ) : string [ ] ;
8056
+ onConfigurationChanged ?( config : any ) : void ;
8057
+ }
8058
+ interface PluginModuleWithName {
8059
+ name : string ;
8060
+ module : PluginModule ;
8038
8061
}
8039
8062
type PluginModuleFactory = ( mod : {
8040
8063
typescript : typeof ts ;
@@ -8173,11 +8196,11 @@ declare namespace ts.server {
8173
8196
filesToString ( writeProjectFileNames : boolean ) : string ;
8174
8197
setCompilerOptions ( compilerOptions : CompilerOptions ) : void ;
8175
8198
protected removeRoot ( info : ScriptInfo ) : void ;
8176
- protected enableGlobalPlugins ( options : CompilerOptions ) : void ;
8177
- 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 ;
8178
8202
/** Starts a new check for diagnostics. Call this if some file has updated that would cause diagnostics to be changed. */
8179
8203
refreshDiagnostics ( ) : void ;
8180
- private enableProxy ;
8181
8204
}
8182
8205
/**
8183
8206
* If a file is opened and no tsconfig (or jsconfig) is found,
@@ -8218,7 +8241,6 @@ declare namespace ts.server {
8218
8241
getConfigFilePath ( ) : NormalizedPath ;
8219
8242
getProjectReferences ( ) : ReadonlyArray < ProjectReference > ;
8220
8243
updateReferences ( refs : ReadonlyArray < ProjectReference > | undefined ) : void ;
8221
- enablePlugins ( ) : void ;
8222
8244
/**
8223
8245
* Get the errors that dont have any file name associated
8224
8246
*/
@@ -8463,6 +8485,7 @@ declare namespace ts.server {
8463
8485
readonly globalPlugins : ReadonlyArray < string > ;
8464
8486
readonly pluginProbeLocations : ReadonlyArray < string > ;
8465
8487
readonly allowLocalPluginLoads : boolean ;
8488
+ private currentPluginConfigOverrides ;
8466
8489
readonly typesMapLocation : string | undefined ;
8467
8490
readonly syntaxOnly ?: boolean ;
8468
8491
/** Tracks projects that we have already sent telemetry for. */
@@ -8638,6 +8661,7 @@ declare namespace ts.server {
8638
8661
applySafeList ( proj : protocol . ExternalProject ) : NormalizedPath [ ] ;
8639
8662
openExternalProject ( proj : protocol . ExternalProject ) : void ;
8640
8663
hasDeferredExtension ( ) : boolean ;
8664
+ configurePlugin ( args : protocol . ConfigurePluginRequestArguments ) : void ;
8641
8665
}
8642
8666
}
8643
8667
declare namespace ts . server {
@@ -8808,6 +8832,7 @@ declare namespace ts.server {
8808
8832
private convertTextChangeToCodeEdit ;
8809
8833
private getBraceMatching ;
8810
8834
private getDiagnosticsForProject ;
8835
+ private configurePlugin ;
8811
8836
getCanonicalFileName ( fileName : string ) : string ;
8812
8837
exit ( ) : void ;
8813
8838
private notRequired ;
0 commit comments