@@ -69,7 +69,8 @@ declare namespace ts {
6969 pos : number ;
7070 end : number ;
7171 }
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 ;
7374 type JsxTokenSyntaxKind = SyntaxKind . LessThanSlashToken | SyntaxKind . EndOfFileToken | SyntaxKind . ConflictMarkerTrivia | SyntaxKind . JsxText | SyntaxKind . JsxTextAllWhiteSpaces | SyntaxKind . OpenBraceToken | SyntaxKind . LessThanToken ;
7475 enum SyntaxKind {
7576 Unknown = 0 ,
@@ -5111,20 +5112,24 @@ declare namespace ts {
51115112 documentation ?: SymbolDisplayPart [ ] ;
51125113 tags ?: JSDocTagInfo [ ] ;
51135114 }
5114- interface RenameInfo {
5115- canRename : boolean ;
5115+ type RenameInfo = RenameInfoSuccess | RenameInfoFailure ;
5116+ interface RenameInfoSuccess {
5117+ canRename : true ;
51165118 /**
51175119 * File or directory to rename.
51185120 * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`.
51195121 */
51205122 fileToRename ?: string ;
5121- localizedErrorMessage ?: string ;
51225123 displayName : string ;
51235124 fullDisplayName : string ;
51245125 kind : ScriptElementKind ;
51255126 kindModifiers : string ;
51265127 triggerSpan : TextSpan ;
51275128 }
5129+ interface RenameInfoFailure {
5130+ canRename : false ;
5131+ localizedErrorMessage : string ;
5132+ }
51285133 interface SignatureHelpParameter {
51295134 name : string ;
51305135 documentation : SymbolDisplayPart [ ] ;
@@ -5668,7 +5673,8 @@ declare namespace ts.server.protocol {
56685673 GetApplicableRefactors = "getApplicableRefactors" ,
56695674 GetEditsForRefactor = "getEditsForRefactor" ,
56705675 OrganizeImports = "organizeImports" ,
5671- GetEditsForFileRename = "getEditsForFileRename"
5676+ GetEditsForFileRename = "getEditsForFileRename" ,
5677+ ConfigurePlugin = "configurePlugin"
56725678 }
56735679 /**
56745680 * A TypeScript Server message
@@ -6434,20 +6440,17 @@ declare namespace ts.server.protocol {
64346440 /**
64356441 * Information about the item to be renamed.
64366442 */
6437- interface RenameInfo {
6443+ type RenameInfo = RenameInfoSuccess | RenameInfoFailure ;
6444+ interface RenameInfoSuccess {
64386445 /**
64396446 * True if item can be renamed.
64406447 */
6441- canRename : boolean ;
6448+ canRename : true ;
64426449 /**
64436450 * File or directory to rename.
64446451 * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`.
64456452 */
64466453 fileToRename ?: string ;
6447- /**
6448- * Error message if item can not be renamed.
6449- */
6450- localizedErrorMessage ?: string ;
64516454 /**
64526455 * Display name of the item to be renamed.
64536456 */
@@ -6467,6 +6470,13 @@ declare namespace ts.server.protocol {
64676470 /** Span of text to rename. */
64686471 triggerSpan : TextSpan ;
64696472 }
6473+ interface RenameInfoFailure {
6474+ canRename : false ;
6475+ /**
6476+ * Error message if item can not be renamed.
6477+ */
6478+ localizedErrorMessage : string ;
6479+ }
64706480 /**
64716481 * A group of text spans, all in 'file'.
64726482 */
@@ -6609,6 +6619,14 @@ declare namespace ts.server.protocol {
66096619 */
66106620 interface ConfigureResponse extends Response {
66116621 }
6622+ interface ConfigurePluginRequestArguments {
6623+ pluginName : string ;
6624+ configuration : any ;
6625+ }
6626+ interface ConfigurePluginRequest extends Request {
6627+ command : CommandTypes . ConfigurePlugin ;
6628+ arguments : ConfigurePluginRequestArguments ;
6629+ }
66126630 /**
66136631 * Information found in an "open" request.
66146632 */
@@ -8035,6 +8053,11 @@ declare namespace ts.server {
80358053 interface PluginModule {
80368054 create ( createInfo : PluginCreateInfo ) : LanguageService ;
80378055 getExternalFiles ?( proj : Project ) : string [ ] ;
8056+ onConfigurationChanged ?( config : any ) : void ;
8057+ }
8058+ interface PluginModuleWithName {
8059+ name : string ;
8060+ module : PluginModule ;
80388061 }
80398062 type PluginModuleFactory = ( mod : {
80408063 typescript : typeof ts ;
@@ -8173,11 +8196,11 @@ declare namespace ts.server {
81738196 filesToString ( writeProjectFileNames : boolean ) : string ;
81748197 setCompilerOptions ( compilerOptions : CompilerOptions ) : void ;
81758198 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 ;
81788202 /** Starts a new check for diagnostics. Call this if some file has updated that would cause diagnostics to be changed. */
81798203 refreshDiagnostics ( ) : void ;
8180- private enableProxy ;
81818204 }
81828205 /**
81838206 * If a file is opened and no tsconfig (or jsconfig) is found,
@@ -8218,7 +8241,6 @@ declare namespace ts.server {
82188241 getConfigFilePath ( ) : NormalizedPath ;
82198242 getProjectReferences ( ) : ReadonlyArray < ProjectReference > ;
82208243 updateReferences ( refs : ReadonlyArray < ProjectReference > | undefined ) : void ;
8221- enablePlugins ( ) : void ;
82228244 /**
82238245 * Get the errors that dont have any file name associated
82248246 */
@@ -8463,6 +8485,7 @@ declare namespace ts.server {
84638485 readonly globalPlugins : ReadonlyArray < string > ;
84648486 readonly pluginProbeLocations : ReadonlyArray < string > ;
84658487 readonly allowLocalPluginLoads : boolean ;
8488+ private currentPluginConfigOverrides ;
84668489 readonly typesMapLocation : string | undefined ;
84678490 readonly syntaxOnly ?: boolean ;
84688491 /** Tracks projects that we have already sent telemetry for. */
@@ -8638,6 +8661,7 @@ declare namespace ts.server {
86388661 applySafeList ( proj : protocol . ExternalProject ) : NormalizedPath [ ] ;
86398662 openExternalProject ( proj : protocol . ExternalProject ) : void ;
86408663 hasDeferredExtension ( ) : boolean ;
8664+ configurePlugin ( args : protocol . ConfigurePluginRequestArguments ) : void ;
86418665 }
86428666}
86438667declare namespace ts . server {
@@ -8808,6 +8832,7 @@ declare namespace ts.server {
88088832 private convertTextChangeToCodeEdit ;
88098833 private getBraceMatching ;
88108834 private getDiagnosticsForProject ;
8835+ private configurePlugin ;
88118836 getCanonicalFileName ( fileName : string ) : string ;
88128837 exit ( ) : void ;
88138838 private notRequired ;
0 commit comments