Skip to content

Commit d6c981b

Browse files
committed
Update LKG
1 parent 1636a26 commit d6c981b

File tree

6 files changed

+27
-4
lines changed

6 files changed

+27
-4
lines changed

lib/protocol.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,10 +1404,18 @@ declare namespace ts.server.protocol {
14041404
* Text of diagnostic message.
14051405
*/
14061406
text: string;
1407+
/**
1408+
* The category of the diagnostic message, e.g. "error" vs. "warning"
1409+
*/
1410+
category: string;
14071411
/**
14081412
* The error code of the diagnostic message.
14091413
*/
14101414
code?: number;
1415+
/**
1416+
* The name of the plugin reporting the message.
1417+
*/
1418+
source?: string;
14111419
}
14121420
interface DiagnosticEventBody {
14131421
/**

lib/tsserver.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76042,14 +76042,18 @@ var ts;
7604276042
start: scriptInfo.positionToLineOffset(diag.start),
7604376043
end: scriptInfo.positionToLineOffset(diag.start + diag.length),
7604476044
text: ts.flattenDiagnosticMessageText(diag.messageText, "\n"),
76045-
code: diag.code
76045+
code: diag.code,
76046+
category: ts.DiagnosticCategory[diag.category].toLowerCase(),
76047+
source: diag.source
7604676048
};
7604776049
}
7604876050
function formatConfigFileDiag(diag) {
7604976051
return {
7605076052
start: undefined,
7605176053
end: undefined,
76052-
text: ts.flattenDiagnosticMessageText(diag.messageText, "\n")
76054+
text: ts.flattenDiagnosticMessageText(diag.messageText, "\n"),
76055+
category: ts.DiagnosticCategory[diag.category].toLowerCase(),
76056+
source: diag.source
7605376057
};
7605476058
}
7605576059
function allEditsBeforePos(edits, pos) {
@@ -76689,6 +76693,7 @@ var ts;
7668976693
length: d.length,
7669076694
category: ts.DiagnosticCategory[d.category].toLowerCase(),
7669176695
code: d.code,
76696+
source: d.source,
7669276697
startLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start),
7669376698
endLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start + d.length)
7669476699
}); });

lib/tsserverlibrary.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1965,6 +1965,7 @@ declare namespace ts {
19651965
messageText: string | DiagnosticMessageChain;
19661966
category: DiagnosticCategory;
19671967
code: number;
1968+
source?: string;
19681969
}
19691970
enum DiagnosticCategory {
19701971
Warning = 0,
@@ -4103,7 +4104,9 @@ declare namespace ts.server.protocol {
41034104
start: Location;
41044105
end: Location;
41054106
text: string;
4107+
category: string;
41064108
code?: number;
4109+
source?: string;
41074110
}
41084111
interface DiagnosticEventBody {
41094112
file: string;

lib/tsserverlibrary.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72361,14 +72361,18 @@ var ts;
7236172361
start: scriptInfo.positionToLineOffset(diag.start),
7236272362
end: scriptInfo.positionToLineOffset(diag.start + diag.length),
7236372363
text: ts.flattenDiagnosticMessageText(diag.messageText, "\n"),
72364-
code: diag.code
72364+
code: diag.code,
72365+
category: ts.DiagnosticCategory[diag.category].toLowerCase(),
72366+
source: diag.source
7236572367
};
7236672368
}
7236772369
function formatConfigFileDiag(diag) {
7236872370
return {
7236972371
start: undefined,
7237072372
end: undefined,
72371-
text: ts.flattenDiagnosticMessageText(diag.messageText, "\n")
72373+
text: ts.flattenDiagnosticMessageText(diag.messageText, "\n"),
72374+
category: ts.DiagnosticCategory[diag.category].toLowerCase(),
72375+
source: diag.source
7237272376
};
7237372377
}
7237472378
function allEditsBeforePos(edits, pos) {
@@ -73008,6 +73012,7 @@ var ts;
7300873012
length: d.length,
7300973013
category: ts.DiagnosticCategory[d.category].toLowerCase(),
7301073014
code: d.code,
73015+
source: d.source,
7301173016
startLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start),
7301273017
endLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start + d.length)
7301373018
}); });

lib/typescript.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,6 +2063,7 @@ declare namespace ts {
20632063
messageText: string | DiagnosticMessageChain;
20642064
category: DiagnosticCategory;
20652065
code: number;
2066+
source?: string;
20662067
}
20672068
enum DiagnosticCategory {
20682069
Warning = 0,

lib/typescriptServices.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,6 +2063,7 @@ declare namespace ts {
20632063
messageText: string | DiagnosticMessageChain;
20642064
category: DiagnosticCategory;
20652065
code: number;
2066+
source?: string;
20662067
}
20672068
enum DiagnosticCategory {
20682069
Warning = 0,

0 commit comments

Comments
 (0)