Merge pull request #81 from remcohaszing/fix-mistyped-enums

Fix mismatched enum types
This commit is contained in:
Remco Haszing 2021-08-19 08:49:47 +02:00 committed by GitHub
commit d4ddc80b51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,7 +19,7 @@ export type WorkerAccessor = (...more: Uri[]) => PromiseLike<YAMLWorker>;
// --- diagnostics --- --- // --- diagnostics --- ---
function toSeverity(lsSeverity: number): MarkerSeverity { function toSeverity(lsSeverity: ls.DiagnosticSeverity): MarkerSeverity {
switch (lsSeverity) { switch (lsSeverity) {
case ls.DiagnosticSeverity.Error: case ls.DiagnosticSeverity.Error:
return MarkerSeverity.Error; return MarkerSeverity.Error;
@ -176,7 +176,7 @@ function toRange(range: ls.Range): Range {
); );
} }
function toCompletionItemKind(kind: number): languages.CompletionItemKind { function toCompletionItemKind(kind: languages.CompletionItemKind): languages.CompletionItemKind {
const mItemKind = languages.CompletionItemKind; const mItemKind = languages.CompletionItemKind;
switch (kind) { switch (kind) {