From d6c981b00abddf77163a9972004a16d70d58ad8f Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Thu, 20 Apr 2017 14:30:30 -0700 Subject: [PATCH] Update LKG --- lib/protocol.d.ts | 8 ++++++++ lib/tsserver.js | 9 +++++++-- lib/tsserverlibrary.d.ts | 3 +++ lib/tsserverlibrary.js | 9 +++++++-- lib/typescript.d.ts | 1 + lib/typescriptServices.d.ts | 1 + 6 files changed, 27 insertions(+), 4 deletions(-) diff --git a/lib/protocol.d.ts b/lib/protocol.d.ts index b02ff258bb3..e093c7068a8 100644 --- a/lib/protocol.d.ts +++ b/lib/protocol.d.ts @@ -1404,10 +1404,18 @@ declare namespace ts.server.protocol { * Text of diagnostic message. */ text: string; + /** + * The category of the diagnostic message, e.g. "error" vs. "warning" + */ + category: string; /** * The error code of the diagnostic message. */ code?: number; + /** + * The name of the plugin reporting the message. + */ + source?: string; } interface DiagnosticEventBody { /** diff --git a/lib/tsserver.js b/lib/tsserver.js index a7c1ca52410..1b4b3546b6a 100644 --- a/lib/tsserver.js +++ b/lib/tsserver.js @@ -76042,14 +76042,18 @@ var ts; start: scriptInfo.positionToLineOffset(diag.start), end: scriptInfo.positionToLineOffset(diag.start + diag.length), text: ts.flattenDiagnosticMessageText(diag.messageText, "\n"), - code: diag.code + code: diag.code, + category: ts.DiagnosticCategory[diag.category].toLowerCase(), + source: diag.source }; } function formatConfigFileDiag(diag) { return { start: undefined, end: undefined, - text: ts.flattenDiagnosticMessageText(diag.messageText, "\n") + text: ts.flattenDiagnosticMessageText(diag.messageText, "\n"), + category: ts.DiagnosticCategory[diag.category].toLowerCase(), + source: diag.source }; } function allEditsBeforePos(edits, pos) { @@ -76689,6 +76693,7 @@ var ts; length: d.length, category: ts.DiagnosticCategory[d.category].toLowerCase(), code: d.code, + source: d.source, startLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start), endLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start + d.length) }); }); diff --git a/lib/tsserverlibrary.d.ts b/lib/tsserverlibrary.d.ts index 4f38b599336..6905f033ac4 100644 --- a/lib/tsserverlibrary.d.ts +++ b/lib/tsserverlibrary.d.ts @@ -1965,6 +1965,7 @@ declare namespace ts { messageText: string | DiagnosticMessageChain; category: DiagnosticCategory; code: number; + source?: string; } enum DiagnosticCategory { Warning = 0, @@ -4103,7 +4104,9 @@ declare namespace ts.server.protocol { start: Location; end: Location; text: string; + category: string; code?: number; + source?: string; } interface DiagnosticEventBody { file: string; diff --git a/lib/tsserverlibrary.js b/lib/tsserverlibrary.js index 6422bd23965..d6cde4873fe 100644 --- a/lib/tsserverlibrary.js +++ b/lib/tsserverlibrary.js @@ -72361,14 +72361,18 @@ var ts; start: scriptInfo.positionToLineOffset(diag.start), end: scriptInfo.positionToLineOffset(diag.start + diag.length), text: ts.flattenDiagnosticMessageText(diag.messageText, "\n"), - code: diag.code + code: diag.code, + category: ts.DiagnosticCategory[diag.category].toLowerCase(), + source: diag.source }; } function formatConfigFileDiag(diag) { return { start: undefined, end: undefined, - text: ts.flattenDiagnosticMessageText(diag.messageText, "\n") + text: ts.flattenDiagnosticMessageText(diag.messageText, "\n"), + category: ts.DiagnosticCategory[diag.category].toLowerCase(), + source: diag.source }; } function allEditsBeforePos(edits, pos) { @@ -73008,6 +73012,7 @@ var ts; length: d.length, category: ts.DiagnosticCategory[d.category].toLowerCase(), code: d.code, + source: d.source, startLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start), endLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start + d.length) }); }); diff --git a/lib/typescript.d.ts b/lib/typescript.d.ts index 16c4d98c829..e7859222364 100644 --- a/lib/typescript.d.ts +++ b/lib/typescript.d.ts @@ -2063,6 +2063,7 @@ declare namespace ts { messageText: string | DiagnosticMessageChain; category: DiagnosticCategory; code: number; + source?: string; } enum DiagnosticCategory { Warning = 0, diff --git a/lib/typescriptServices.d.ts b/lib/typescriptServices.d.ts index 3e922940be2..c79d517f348 100644 --- a/lib/typescriptServices.d.ts +++ b/lib/typescriptServices.d.ts @@ -2063,6 +2063,7 @@ declare namespace ts { messageText: string | DiagnosticMessageChain; category: DiagnosticCategory; code: number; + source?: string; } enum DiagnosticCategory { Warning = 0,