diff --git a/yaml/_loader_state.ts b/yaml/_loader_state.ts index 987502a80d09..617c79bec331 100644 --- a/yaml/_loader_state.ts +++ b/yaml/_loader_state.ts @@ -204,7 +204,7 @@ export class LoaderState { anchorMap = new Map(); tag: string | null = null; anchor: string | null = null; - kind: string | null = null; + kind: KindType | null = null; result: unknown[] | Record | string | null = ""; constructor( @@ -1473,7 +1473,7 @@ export class LoaderState { return; } - const kind = (this.kind ?? "fallback") as KindType; + const kind = this.kind ?? "fallback"; const map = this.typeMap[kind]; const type = map.get(this.tag);