diff --git a/yaml/_loader_state.ts b/yaml/_loader_state.ts index 3e0e6560004c..dc66d219b6fe 100644 --- a/yaml/_loader_state.ts +++ b/yaml/_loader_state.ts @@ -203,8 +203,8 @@ export class LoaderState { tagMap = new Map(); anchorMap = new Map(); tag: string | null = null; - anchor: string | null | undefined; - kind: string | null | undefined; + anchor: string | null = null; + kind: string | null = null; result: unknown[] | Record | string | null = ""; constructor(