GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — `===` narrowing of a primitive union now produces a non-widening literal type (regression from microsoft/typescript-go#4781) · Issue #64766 · microsoft/TypeScript Open Labels BugA bug in TypeScript Milestone Description🔎 Search Termsnarrowing equality literal widening, non-widening literal, narrowTypeByEquality, isUniformUnionType, TS2322 narrowed let, flatMap union inference 7.1 🕗 Version & Regression Information
⏯ Playground LinkTypeScript Go Playground, nightly 2026.10.13 💻 Code( declare const kind: string | undefined; if (kind === "a") { let copy = kind; copy = "b"; const obj = { kind }; obj.kind = "b"; const arr = [kind]; arr.push("b"); } declare const count: number | undefined; if (count === 1) { let copy = count; copy = 2; } 🙁 Actual behaviorThe narrowed 🙂 Expected behaviorNo errors, matching 6.0.3, 7.0.2 and the commit before microsoft/typescript-go#4781. Inside the Additional information about the issue(This bug report was assembled by AI, but I reviewed it prior to posting.)
Reacted by snarbles2 ActivityMetadataMetadataAssigneesLabelsBugA bug in TypeScript TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |