@@ -20,7 +20,7 @@ import * as htmlContent from 'vs/base/common/htmlContent';
2020import { IRelativePattern } from 'vs/base/common/glob' ;
2121import * as languageSelector from 'vs/editor/common/modes/languageSelector' ;
2222import { WorkspaceEditDto , ResourceTextEditDto } from 'vs/workbench/api/node/extHost.protocol' ;
23- import { MarkerSeverity , IRelatedInformation , IMarkerData } from 'vs/platform/markers/common/markers' ;
23+ import { MarkerSeverity , IRelatedInformation , IMarkerData , MarkerTag } from 'vs/platform/markers/common/markers' ;
2424
2525export interface PositionLike {
2626 line : number ;
@@ -88,6 +88,16 @@ export namespace Position {
8888 }
8989}
9090
91+ export namespace DiagnosticTag {
92+ export function from ( value : vscode . DiagnosticTag ) : MarkerTag {
93+ switch ( value ) {
94+ case types . DiagnosticTag . Unnecessary :
95+ return MarkerTag . Unnecessary ;
96+ }
97+ return undefined ;
98+ }
99+ }
100+
91101export namespace Diagnostic {
92102 export function from ( value : vscode . Diagnostic ) : IMarkerData {
93103 return {
@@ -97,7 +107,7 @@ export namespace Diagnostic {
97107 code : String ( value . code ) ,
98108 severity : DiagnosticSeverity . from ( value . severity ) ,
99109 relatedInformation : value . relatedInformation && value . relatedInformation . map ( DiagnosticRelatedInformation . from ) ,
100- customTags : value . customTags ,
110+ customTags : Array . isArray ( value . customTags ) ? value . customTags . map ( DiagnosticTag . from ) : undefined ,
101111 } ;
102112 }
103113}
0 commit comments