Skip to content

Commit f455ad5

Browse files
Update to TypeScript 3.1.5.
1 parent f84ed01 commit f455ad5

11 files changed

+1118
-1193
lines changed

tsserver/enu/diagnosticMessages.generated.json.lcg

+6
Original file line numberDiff line numberDiff line change
@@ -3339,6 +3339,12 @@
33393339
</Str>
33403340
<Disp Icon="Str" />
33413341
</Item>
3342+
<Item ItemId=";JSDoc_type_0_circularly_references_itself_2587" ItemType="0" PsrId="306" Leaf="true">
3343+
<Str Cat="Text">
3344+
<Val><![CDATA[JSDoc type '{0}' circularly references itself.]]></Val>
3345+
</Str>
3346+
<Disp Icon="Str" />
3347+
</Item>
33423348
<Item ItemId=";JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021" ItemType="0" PsrId="306" Leaf="true">
33433349
<Str Cat="Text">
33443350
<Val><![CDATA[JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags.]]></Val>

tsserver/protocol.d.ts

+20-7
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ declare namespace ts.server.protocol {
6161
GetApplicableRefactors = "getApplicableRefactors",
6262
GetEditsForRefactor = "getEditsForRefactor",
6363
OrganizeImports = "organizeImports",
64-
GetEditsForFileRename = "getEditsForFileRename"
64+
GetEditsForFileRename = "getEditsForFileRename",
65+
ConfigurePlugin = "configurePlugin"
6566
}
6667
/**
6768
* A TypeScript Server message
@@ -827,20 +828,17 @@ declare namespace ts.server.protocol {
827828
/**
828829
* Information about the item to be renamed.
829830
*/
830-
interface RenameInfo {
831+
type RenameInfo = RenameInfoSuccess | RenameInfoFailure;
832+
interface RenameInfoSuccess {
831833
/**
832834
* True if item can be renamed.
833835
*/
834-
canRename: boolean;
836+
canRename: true;
835837
/**
836838
* File or directory to rename.
837839
* If set, `getEditsForFileRename` should be called instead of `findRenameLocations`.
838840
*/
839841
fileToRename?: string;
840-
/**
841-
* Error message if item can not be renamed.
842-
*/
843-
localizedErrorMessage?: string;
844842
/**
845843
* Display name of the item to be renamed.
846844
*/
@@ -860,6 +858,13 @@ declare namespace ts.server.protocol {
860858
/** Span of text to rename. */
861859
triggerSpan: TextSpan;
862860
}
861+
interface RenameInfoFailure {
862+
canRename: false;
863+
/**
864+
* Error message if item can not be renamed.
865+
*/
866+
localizedErrorMessage: string;
867+
}
863868
/**
864869
* A group of text spans, all in 'file'.
865870
*/
@@ -1002,6 +1007,14 @@ declare namespace ts.server.protocol {
10021007
*/
10031008
interface ConfigureResponse extends Response {
10041009
}
1010+
interface ConfigurePluginRequestArguments {
1011+
pluginName: string;
1012+
configuration: any;
1013+
}
1014+
interface ConfigurePluginRequest extends Request {
1015+
command: CommandTypes.ConfigurePlugin;
1016+
arguments: ConfigurePluginRequestArguments;
1017+
}
10051018
/**
10061019
* Information found in an "open" request.
10071020
*/

tsserver/tsc.js

+122-155
Large diffs are not rendered by default.

tsserver/tsserver.js

+219-222
Large diffs are not rendered by default.

tsserver/tsserverlibrary.d.ts

+40-15
Original file line numberDiff line numberDiff line change
@@ -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
}
86438667
declare 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

Comments
 (0)