WhatBrokeToday
GTA 6FAQ
Bun

Bun check Reports False TS2322 Error on Object Literals in Loops

minor

Is it fixed? Not yet.

Ongoing since Nov 17, 14:05 UTC. First reported Nov 17, 14:05 UTC.

What happened

Bun 1.4.4+38afee6c8 throws a false TS2322 type error on object literal arguments inside loops when variables are reassigned, whereas standard TypeScript compilers (tsc 6.0.3 and 7.0.2) accept the code without issues. Developers using bun check for typechecking are affected.

What caused it?

Under active investigation. No report has identified a root cause yet.

No verified workaround yet

None of the linked reports describe a mitigation. This page updates when one appears.

Timeline

  1. Investigating(current)
  2. Workaround available(upcoming)
  3. Resolved(upcoming)
  1. First report on GitHub issue

    `bun check`: false TS2322 on an object literal in `out = out && placeOne(out, { kind: 'place' })` inside a loop, which tsc 7.0.2 accepts

    Source

Evidence

1 report · 1 GitHubShow
  1. [1]
    GitHub First report
    `bun check`: false TS2322 on an object literal in `out = out && placeOne(out, { kind: 'place' })` inside a loop, which tsc 7.0.2 accepts(opens GitHub issue in a new tab)

    What version of Bun is running? 1.4.4+38afee6c8 What platform is your computer? Darwin 27.0.0 arm64 arm What steps can reproduce the bug? bun check reports a false TS2322 on an object literal argument, inside a loop, when the loop reassigns a narrowed variable from a call that takes that variable: out = out && placeOne(out, { kind: 'place', id }) The literal 'place' is checked as string, as if the argument had no contextual type. tsc 6.0.3 and 7.0.2 both accept the project. repro.ts type Place…

    by gaiustemple-harmony 0upvotes 1comments

FAQ

What happened in the Bun outage?

Bun 1.4.4+38afee6c8 throws a false TS2322 type error on object literal arguments inside loops when variables are reassigned, whereas standard TypeScript compilers (tsc 6.0.3 and 7.0.2) accept the code without issues. Developers using bun check for typechecking are affected.

What is affected by the Bun outage?

Bun (versions: 1.4.4+38afee6c8).

When did the Bun outage start and end?

It started Nov 17, 14:05 UTC and is still ongoing (1 d 14 h so far). This page updates as it develops.

How do I get alerts for Bun?

Subscribe to the Bun RSS feed for every new Bun incident, or connect an AI assistant to WhatBrokeToday over MCP and ask whether Bun is down. Bun feed

Where does this information come from?

WhatBrokeToday collects public status pages, developer community reports and security advisories, groups the ones about the same problem, and links every report under Evidence on this page. This one has 1 report from 1 independent source.