Skip to content

Negated Types - #63926

Closed
Wesley Wigham (weswigham) wants to merge 11 commits into
microsoft:mainfrom
weswigham:port-negated-types
Closed

Wesley Wigham (weswigham) wants to merge 11 commits into
microsoft:mainfrom
weswigham:port-negated-types

Conversation

@weswigham

@weswigham Wesley Wigham (weswigham) commented Aug 20, 2026

Copy link
Copy Markdown
Member

This PR is a port of microsoft/typescript-go#4200 which is a port of #29317 for this codebase, with further work to enable control flow creation of negations added on.

To repeat from those PRs:

Long have we spoken of them in hushed tones and referenced them in related issues, here they are:

Negated Types

Negated types, as the name may imply, are the negation of another type. Conceptually, this means that if string covers all values which are strings at runtime, a "not string" covers all values which are... not. We had hoped that conditional types would by and large subsume any use negated types would have... and they mostly do, except in many cases we need to apply the constraint implied by the conditional's check to it's result. In the true branch, we can just intersect the extends clause type, however in the false branch we've thus far been discarding the information. This means unions may not be filtered as they should (especially when conditionals nest) and information can be lost. So that ended up being the primary driver for this primitive - it's taking what a conditional type false branch implies, and allowing it to stand alone as a type.

Syntax

not T

where T is another type. I'm open to bikeshedding this, or even shipping without syntax available, but among alternatives (!, ~) not reads pretty well.

Identities

These are little tricks we do on negated type construction to help speed things along (and give negations on algebraic types canonical forms).

  • not not T is T
  • not (A | B | C | ...) is not A & not B & not C & not ...
  • not (A & B & C & ...) is not A | not B | not C | not ...
  • not unknown is never
  • not never is unknown
  • not any is any (since any is the NaN of types and behaves as both the bottom and top)
  • T | not T is unknown, T & not T is never

Assignability Rules

Negated types, for perhaps obvious reasons, cannot be related structurally - the only sane way to relate them is in a higher-order fashion. Thus, the rules governing these relations are very important.

  • A negated type not S is related to a negated type not T if T is related to S.
    This follows from the set membership inversion that a negation implies - if normally a type S and a type T would be related if S is a subset of T, when we take the complements of those sets, not S and not T, those sets share an inverse relationship to the originals.
  • A type S is related to a negated type not T if the intersection of S and T is empty
    We want to check if for all values in S, none of those values are also in T (since if they are, S is not in the negation of T). The intersection of S and T, when simplified and evaluated, is exactly the description of the common domain of the two. If this domain is empty (never), then we can conclude that there is no overlap between the two and that S must lie within not T.
  • A negated type not S is not related to a type T.
    A negated type describes a set of values that reaches from unknown to its bound, while a normal type describes values from its bound to never - it's impossible for a negated type to satisfy a normal type

Assignability Addendum for Fresh Object Types

Frequently we want to consider a fresh object type as a singleton type (indeed, some examples in the refs assume this) - it corresponds to one runtime value, not the bounds on a value (meaning, as a type, both its upper and lower bounds are itself). Using this, we can add one more rule that allows fresh literal types to easily satisfy negated object types.

  • A fresh object type S is related to a negated type not T if S is not related to T.
    Since S is a singleton type, we can assume that so long as it's type is not in T, then it is in not T.

Examples

Examples of negated type usage can be found in the tests of this PR (there's a few hundred lines of them, and probably some more to come for good measure), but here's some of the common ones, pulled from the referenced issues:

declare function ignore<T extends not (object & Promise<any>)>(value: T): void;
declare function readFileAsync(): Promise<string>;
declare function readFileSync(): string;
ignore(readFileSync());     // OK
ignore(readFileAsync());    // Should error

declare function map<T, U extends not void>(values: T[], map: (value: T) => U) : U[]; // validate map callback doesn't return void

function foo() {}

map([1, 2, 3], n => n + 1); // OK
map([1, 2, 3], foo);        // Should error

function asValid<T extends not null>(value: T, isValid: (value: T) => boolean) : T | null {
    return isValid(value) ? value : null;
}

declare const x: number;
declare const y: number | null;
asValid(x, n => n >= 0);    // OK
asValid(y, n => n >= 0);    // Should error

function tryAt<T extends not undefined>(values: T[], index: number): T | undefined {
    return values[index];
}

declare const a: number[];
declare const b: (number | undefined)[];
tryAt(a, 0);    // OK
tryAt(b, 0);    // Should error

Fixes #26240.
Allows #27711 to be cleanly fixed with a lib change (example in the tests).

Ref #4183, #4196, #7648, #12215, #18280

Copilot AI balanced review requested due to automatic review settings August 20, 2026 18:51
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Aug 20, 2026
@typescript-automation typescript-automation Bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Aug 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds negated types, their syntax, type relations, inference, normalization, and control-flow narrowing.

Changes:

  • Adds not T parsing, AST/API encoding, and declaration emit.
  • Implements negated-type construction, inference, assignability, and CFA.
  • Adds extensive compiler tests and updated baselines.

Several regressions remain, including incorrect diagnostics, lost literal narrowing, leaked CFA types, and the still-failing #26240 case.

Reviewed changes

Copilot reviewed 255 out of 260 changed files in this pull request and generated 6 comments.

Show a summary per file
File group Description
tsc/internal/{scanner,parser,ast,api/encoder} Adds not syntax and AST serialization.
tsc/internal/checker/* Implements negated types, relations, inference, normalization, and narrowing.
packages/typescript/src/{ast,api,enums}/* Exposes generated AST and flag changes.
tools/scripts/tsc/ast.json, Herebyfile.mjs Updates code generation definitions.
tsc/testdata/tests/cases/conformance/types/negated/* Adds negated-type conformance coverage.
tsc/testdata/baselines/reference/{compiler,conformance}/* Updates expected diagnostics, types, symbols, emit, and declarations.
Files not reviewed (5)
  • tsc/internal/api/encoder/decoder_generated.go: Generated file
  • tsc/internal/api/encoder/encoder_generated.go: Generated file
  • tsc/internal/ast/ast_generated.go: Generated file
  • tsc/internal/ast/kind_generated.go: Generated file
  • tsc/internal/ast/kind_stringer_generated.go: Generated file

Comment thread tsc/internal/checker/checker.go
Comment thread tsc/internal/checker/flow.go
Comment thread tsc/testdata/baselines/reference/compiler/arrayDestructuringInSwitch1.errors.txt Outdated
Comment on lines +223 to +227
for _, nonNegatedType := range nonNegatedSet {
if c.isTypeSubtypeOf(nonNegatedType, negatedBounds) {
return true
}
}
@LukeAbby

Copy link
Copy Markdown

I believe I found a few bugs related to the fresh literal type exactness logic. I posted at the meeting notes originally but I want to copy it here for visibility as well.

  1. What about the typeRelatedToDiscriminatedType special case? Basically this allows { type: "a" | "b" } to be assignable to { type: "a" } | { type: "b" }. I think this can cause a problem here.
type A = { kind: "a" };
type B = { kind: "b" };
declare const ab: "a" | "b";

const aOrB: A | B = { kind: ab }; // Ok
const notAOrB: not (A | B)  = { kind: ab }; // Ok
  1. Bonus issue:
const _oops: not { a: 1 } = { a: 1 }; // Ok

This one happens because the fresh literal { a: 1 } is allowed to widen to { a: number } but still hits the fresh literal path that ends up accepting this.

Currently const _ok: not { a: 1 } = { a: 2 }; is essentially accepted by coincidence (it hits that same number widening). So something will have to prevent the widening. One route would be contextual typing. Though that raises some interesting questions like:

const _f: not ((x: number) => string) = (arg) => doStuff(x)
// should `arg` should contextually type as `not number`?
// should the return should contextually type as `not string`?

Currently there doesn't appear to be an attempt to contextually type this. Also it seems like it'll interact poorly with function overloading.

@weswigham

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) test top1000
TypeScript Bot (@typescript-bot) run dt

This is currently what I'd call the conservative core. Technically we could cut more control flow features and leave just the new type constructor (and still have a valuable new feature!), but I think this is the "safe" implementation after some review and iteration, and should be a fine baseline. Per our last discussion, I'll be working on opening individual PRs with:

  1. Control flow in false branches of assertions (ie, falsifiable assertions) - this is a change to consider assertions invertible. They sort-of are considered as such for union narrowing in false branches already, but this isn't strictly correct, and smoke test failures with this enabled prove it out, so I expect that'll have many extra user code failures. Certainly, I used to have it in this PR until I saw the smoke test failure, because it makes sense.
  2. No control flow freshness for negations. This'll definitely break more stuff on DT, in user code where textual type assertions are more rare.... eh? Could be OK, could be horrible.
  3. Drive type facts with negations instead of deriving negations from type facts. This one I experimented with years ago and is... conceptually pure, but computationally annoying. Facts as-is are fast, building new refined types is not. The limited facts-imply-some-negations I currently have is, I believe, a reasonable, safe compromise position to avoid many breaks, but I guess it's worth seeing the "pure" version again. It'll break a lot, there will be negations everywhere, and might only make sense layered over non-fresh control flow.
  4. Negated substitutions in conditional type false branches. This is also technically a break in how strictly we interpret conditions in conditionals, but maybe a good one. It used to be part of this core PR, but I hit upon some breaks I didn't like and excised it, even though it was an original motivator.
  5. Swapping Extract and Exclude to T & U and T & not U, respectively. This could break a bunch! But seems logically beneficial, especially for resolving the Extract<T, U> | Exclude<T, U> == T problem! ((T & U) | (T & not U) simplifies to the common subtype T in this PR already!)
  6. Constrain the global Promise<T> to be Promise<T extends not { then(): any }> to forbid invalid promise-type nesting. This will definitely be breaky as it'll break every redeclaration of Promise in the wild, and probably make structural copies like bluebird promises weird.
  7. Remove the equivalence of unknown = {} | null | undefined and add {} = unknown & not null & not undefined instead. This has the potential to behave differently with respect to distributive positions, it'll be interesting to see how it breaks things, since the two representations are logically identical otherwise.

AFAIK that just about covers all the things we speculated might be cool directions to take negations with further work if we'd be OK with some amount of breakage.

@typescript-automation

typescript-automation Bot commented Sep 15, 2026

Copy link
Copy Markdown

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
test top1000 ✅ Started 👀 Results
run dt ✅ Started

@typescript-automation

Copy link
Copy Markdown

Wesley Wigham (@weswigham) Here are the results of running the top 1000 repos with tsc comparing main and refs/pull/63926/merge:

Something interesting changed - please have a look.

Details

advaitpaliwal/feynman

1 of 4 projects failed to build with the old tsc and were ignored

tsconfig.json

tsconfig.build.json

workbench-web/tsconfig.json

alibaba/hooks

2 of 4 projects failed to build with the old tsc and were ignored

packages/hooks/tsconfig.pro.json

packages/hooks/tsconfig.json

AnmolSaini16/mapcn

tsconfig.json

bombshell-dev/clack

tsconfig.json

packages/prompts/tsconfig.json

examples/changesets/tsconfig.json

examples/basic/tsconfig.json

botpress/botpress

148 of 153 projects failed to build with the old tsc and were ignored

packages/zui/tsconfig.json

Budibase/budibase

9 of 14 projects failed to build with the old tsc and were ignored

packages/string-templates/tsconfig.json

packages/cli/tsconfig.json

cheeriojs/cheerio

1 of 3 projects failed to build with the old tsc and were ignored

tsconfig.typedoc.json

  • error TS2345: Argument of type 'string | (Record<string, string | number | boolean | Attribute[] | ChildNode[] | CDATA | Comment | Document | Element | ... 7 more ... | undefined> & not string)' is not assignable to parameter of type 'string'.
  • error TS2345: Argument of type '(ArrayLike<AnyNode> | CDATA | Comment | Document | Element | ProcessingInstruction | Text)[] | (((ArrayLike<...> | AnyNode) & not string) & any[])' is not assignable to parameter of type 'ArrayLike<AnyNode> | undefined'.

tsconfig.json

  • error TS2345: Argument of type 'string | (Record<string, string | number | boolean | Attribute[] | ChildNode[] | CDATA | Comment | Document | Element | ... 7 more ... | undefined> & not string)' is not assignable to parameter of type 'string'.
  • error TS2345: Argument of type '(ArrayLike<AnyNode> | CDATA | Comment | Document | Element | ProcessingInstruction | Text)[] | (((ArrayLike<...> | AnyNode) & not string) & any[])' is not assignable to parameter of type 'ArrayLike<AnyNode> | undefined'.

chenglou/pretext

tsconfig.json

chrismaltby/gb-studio

1 of 2 projects failed to build with the old tsc and were ignored

tsconfig.json

cordiverse/cordis

14 of 18 projects failed to build with the old tsc and were ignored

packages/core/tsconfig.json

@typescript-automation

Copy link
Copy Markdown

Wesley Wigham (@weswigham) Here are some more interesting changes from running the top 1000 repos suite

Details

corsairdev/corsair

85 of 329 projects failed to build with the old tsc and were ignored

tsconfig.json

packages/zoominfo/tsconfig.json

packages/zohoinventory/tsconfig.json

packages/youcom/tsconfig.json

packages/xquik/tsconfig.json

packages/worldnewsapi/tsconfig.json

packages/workiom/tsconfig.json

packages/workday/tsconfig.json

packages/wiza/tsconfig.json

packages/wix/tsconfig.json

packages/witai/tsconfig.json

packages/whatsapp/tsconfig.json

packages/webvizio/tsconfig.json

packages/webflow/tsconfig.json

packages/wakatime/tsconfig.json

packages/vestaboard/tsconfig.json

packages/veriphone/tsconfig.json

packages/uploadcare/tsconfig.json

packages/uniswapapi/tsconfig.json

packages/unione/tsconfig.json

packages/ui/tsconfig.json

packages/ui/tsconfig.build.json

packages/twilio/tsconfig.json

packages/twentyonerisk/tsconfig.json

packages/toggl/tsconfig.json

packages/tisane/tsconfig.json

packages/tinyurl/tsconfig.json

packages/timelink/tsconfig.json

packages/timecamp/tsconfig.json

packages/ticktick/tsconfig.json

packages/textrazor/tsconfig.json

packages/synthflowai/tsconfig.json

packages/supabase/tsconfig.json

packages/studiobyai21labs/tsconfig.json

packages/studio/tsconfig.build.json

packages/streamtime/tsconfig.json

packages/sourcegraph/tsconfig.json

packages/serpapi/tsconfig.json

packages/sendgrid/tsconfig.json

packages/securitytrails/tsconfig.json

packages/scrapegraphai/tsconfig.json

packages/scaleai/tsconfig.json

packages/sapsuccessfactors/tsconfig.json

packages/salesforce/tsconfig.json

packages/runpod/tsconfig.json

packages/retailed/tsconfig.json

packages/removebg/tsconfig.json

packages/reddit/tsconfig.json

packages/pinecone/tsconfig.json

packages/perplexityai/tsconfig.json

packages/pdfmonkey/tsconfig.json

packages/parseur/tsconfig.typecheck.json

packages/parseur/tsconfig.json

packages/openrouter/tsconfig.json

packages/onepassword/tsconfig.json

packages/ollama/tsconfig.json

packages/ocrwebservice/tsconfig.json

packages/ocrspace/tsconfig.json

packages/nextdns/tsconfig.json

packages/neon/tsconfig.json

packages/merriamwebsterdict/tsconfig.json

packages/mcp/tsconfig.json

packages/mcp/tsconfig.build.json

packages/marketstack/tsconfig.json

packages/mailtrap/tsconfig.json

packages/mailchimp/tsconfig.json

packages/loyverse/tsconfig.json

packages/linkedin/tsconfig.json

packages/kibana/tsconfig.json

packages/kaggle/tsconfig.json

packages/jigsawstack/tsconfig.json

packages/instagram/tsconfig.json

packages/insightoai/tsconfig.json

packages/imgbb/tsconfig.json

packages/huggingface/tsconfig.json

packages/htmltoimage/tsconfig.typecheck.json

packages/htmltoimage/tsconfig.json

packages/heygen/tsconfig.json

packages/here/tsconfig.json

packages/hashnode/tsconfig.json

packages/harvest/tsconfig.json

packages/habitica/tsconfig.json

packages/groqcloud/tsconfig.json

packages/googlemaps/tsconfig.json

packages/googlecloudvision/tsconfig.json

packages/googlebigquery/tsconfig.json

packages/googleanalytics/tsconfig.json

packages/googleaddressvalidation/tsconfig.json

packages/gladia/tsconfig.json

packages/gemini/tsconfig.json

packages/formbricks/tsconfig.json

packages/flexisign/tsconfig.json

packages/filloutforms/tsconfig.json

packages/faraday/tsconfig.json

packages/facebook/tsconfig.json

packages/exist/tsconfig.json

packages/epicgames/tsconfig.json

packages/emelia/tsconfig.json

packages/dynapictures/tsconfig.json

packages/dropboxsign/tsconfig.json

packages/dripcel/tsconfig.json

packages/dreamstudio/tsconfig.json

packages/doppler/tsconfig.json

packages/dockerhub/tsconfig.json

packages/digitalocean/tsconfig.json

packages/diffbot/tsconfig.json

packages/devinmcp/tsconfig.json

packages/deepseek/tsconfig.json

packages/datarobot/tsconfig.json

packages/datadog/tsconfig.json

packages/databricks/tsconfig.json

packages/dadataru/tsconfig.json

packages/customgpt/tsconfig.json

packages/cursor/tsconfig.json

@typescript-automation

Copy link
Copy Markdown

Wesley Wigham (@weswigham) Here are some more interesting changes from running the top 1000 repos suite

Details

darkreader/darkreader

5 of 6 projects failed to build with the old tsc and were ignored

tests/unit/tsconfig.json

  • error TS2367: This comparison appears to be unintentional because the types 'number & not 0' and '0' have no overlap.

date-fns/date-fns

8 of 14 projects failed to build with the old tsc and were ignored

pkgs/dev/tsconfig.json

davidjerleke/embla-carousel

14 of 20 projects failed to build with the old tsc and were ignored

packages/embla-carousel/tsconfig.json

diegosouzapw/OmniRoute

3 of 10 projects failed to build with the old tsc and were ignored

tsconfig.typecheck-noimplicit-core.json

tsconfig.typecheck-core.json

open-sse/tsconfig.json

dream-num/univer

135 of 161 projects failed to build with the old tsc and were ignored

presets/tsconfig.node.json

presets/tsconfig.json

packages/thread-comment/tsconfig.node.json

packages/thread-comment/tsconfig.json

packages/telemetry/tsconfig.node.json

packages/telemetry/tsconfig.json

packages/rpc-node/tsconfig.node.json

packages/rpc-node/tsconfig.json

packages/rpc/tsconfig.node.json

packages/rpc/tsconfig.json

packages/network/tsconfig.node.json

packages/network/tsconfig.json

packages/engine-formula/tsconfig.node.json

packages/engine-formula/tsconfig.json

packages/drawing/tsconfig.node.json

packages/drawing/tsconfig.json

packages/docs-hyper-link/tsconfig.node.json

packages/docs-hyper-link/tsconfig.json

packages/core/tsconfig.node.json

packages/core/tsconfig.json

@typescript-automation

Copy link
Copy Markdown

Wesley Wigham (@weswigham) Here are some more interesting changes from running the top 1000 repos suite

Details

earendil-works/pi

14 of 17 projects failed to build with the old tsc and were ignored

packages/chord/tsconfig.build.json

packages/agent/tsconfig.build.json

EKKOLearnAI/hermes-studio

1 of 5 projects failed to build with the old tsc and were ignored

packages/server/tsconfig.json

packages/ekko-agent/tsconfig.json

packages/ekko-agent/tsconfig.build.json

every-app/open-seo

1 of 3 projects failed to build with the old tsc and were ignored

tsconfig.json

fabricjs/fabric.js

4 of 7 projects failed to build with the old tsc and were ignored

tsconfig.packages.build.json

tsconfig.build.json

tsconfig-extensions.json

fluxerapp/fluxer

21 of 43 projects failed to build with the old tsc and were ignored

fluxer_api/tsconfig.json

fluxer_api/pkgs/kv_client/tsconfig.json

foambubble/foam

4 of 7 projects failed to build with the old tsc and were ignored

packages/foam-core/tsconfig.portability.json

packages/foam-core/tsconfig.json

getagentseal/codeburn

3 of 5 projects failed to build with the old tsc and were ignored

tsconfig.json

  • error TS2367: This comparison appears to be unintentional because the types 'number & not 0' and '0' have no overlap.
  • error TS2322: Type 'string' is not assignable to type '"fast" | "standard" | undefined'.
  • error TS2367: This comparison appears to be unintentional because the types 'number & not 34' and '34' have no overlap.
  • error TS2367: This comparison appears to be unintentional because the types 'string & not "user" & not "assistant" & not "model"' and '"user"' have no overlap.
  • error TS2345: Argument of type 'string' is not assignable to parameter of type '"claude" | "codex"'.

app/tsconfig.electron.json

getpaseo/paseo

12 of 17 projects failed to build with the old tsc and were ignored

packages/website/tsconfig.json

packages/relay/tsconfig.json

getsentry/sentry-javascript

291 of 358 projects failed to build with the old tsc and were ignored

packages/cloudflare/tsconfig.types.json

packages/cloudflare/tsconfig.json

packages/browser-utils/tsconfig.types.json

packages/browser-utils/tsconfig.json

graphql/graphql-js

3 of 4 projects failed to build with the old tsc and were ignored

tsconfig.json

homarr-labs/dashboard-icons

web/tsconfig.json

homebridge/homebridge

tsconfig.typecheck.json

  • error TS2367: This comparison appears to be unintentional because the types 'string & not "rvcCleanMode" & not "serviceArea" & not "powerSource"' and '"serviceArea"' have no overlap.

tsconfig.json

  • error TS2367: This comparison appears to be unintentional because the types 'string & not "rvcCleanMode" & not "serviceArea" & not "powerSource"' and '"serviceArea"' have no overlap.

hyperdxio/hyperdx

5 of 9 projects failed to build with the old tsc and were ignored

packages/hdx-eval/tsconfig.json

packages/hdx-eval/tsconfig.build.json

packages/common-utils/tsconfig.json

James-Yu/LaTeX-Workshop

2 of 4 projects failed to build with the old tsc and were ignored

tsconfig.json

  • error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ page?: number | undefined; x?: number | undefined; y?: number | undefined; }'.
  • error TS7053: Element implicitly has an 'any' type because expression of type 'string & not "Page"' can't be used to index type 'SyncTeXRecordToPDFAll'.
  • error TS2345: Argument of type 'string' is not assignable to parameter of type '"(" | "[" | "{"'.

@typescript-automation

Copy link
Copy Markdown

Wesley Wigham (@weswigham) Here are some more interesting changes from running the top 1000 repos suite

Details

krillinai/OpenCreator

3 of 11 projects failed to build with the old tsc and were ignored

apps/desktop/tsconfig.test.json

  • error TS2345: Argument of type '{ closeBehavior?: {} | undefined; telemetryEnabled?: boolean | undefined; }' is not assignable to parameter of type 'Partial<DesktopSettings>'.

apps/daemon/tsconfig.test.json

apps/daemon/tsconfig.json

lidge-jun/opencodex

1 of 5 projects failed to build with the old tsc and were ignored

tsconfig.json

tests/tsconfig.doctor-service-memory-contract.json

scripts/test-layout/tsconfig.verify.json

liketrek/TREK

5 of 7 projects failed to build with the old tsc and were ignored

shared/tsconfig.json

plugin-sdk/tsconfig.json

lokesh/color-thief

tsconfig.json

  • error TS2322: Type 'string' is not assignable to type 'Command'.
  • error TS2322: Type 'string' is not assignable to type '"oklch" | "rgb"'.

marktext/marktext

3 of 5 projects failed to build with the old tsc and were ignored

packages/muya/tsconfig.json

packages/desktop/tsconfig.json

@typescript-automation

Copy link
Copy Markdown

Wesley Wigham (@weswigham) Here are some more interesting changes from running the top 1000 repos suite

Details

MemTensor/MemOS

5 of 9 projects failed to build with the old tsc and were ignored

apps/memos-local-plugin/tsconfig.viewer.json

apps/memos-local-plugin/tsconfig.json

apps/memos-local-plugin/tsconfig.build.json

microsoft/fast

7 of 13 projects failed to build with the old tsc and were ignored

packages/fast-element/tsconfig.json

packages/fast-element/tsconfig.api-extractor.json

packages/fast-element/test/tsconfig.json

mikro-orm/mikro-orm

4 of 47 projects failed to build with the old tsc and were ignored

tests/features/decorators/es/tsconfig.json

packages/sqlite/tsconfig.json

packages/sqlite/tsconfig.build.json

packages/sql-js/tsconfig.json

packages/sql-js/tsconfig.build.json

packages/sql/tsconfig.json

packages/sql/tsconfig.build.json

packages/postgresql/tsconfig.json

packages/postgresql/tsconfig.build.json

packages/pglite/tsconfig.json

packages/pglite/tsconfig.build.json

packages/oracledb/tsconfig.json

packages/oracledb/tsconfig.build.json

packages/mysql/tsconfig.json

packages/mysql/tsconfig.build.json

packages/mssql/tsconfig.json

packages/mssql/tsconfig.build.json

packages/migrations/tsconfig.json

packages/migrations/tsconfig.build.json

packages/mariadb/tsconfig.json

packages/mariadb/tsconfig.build.json

packages/libsql/tsconfig.json

packages/libsql/tsconfig.build.json

packages/knex-compat/tsconfig.json

packages/knex-compat/tsconfig.build.json

packages/entity-generator/tsconfig.json

packages/entity-generator/tsconfig.build.json

packages/cli/tsconfig.json

packages/cli/tsconfig.build.json

millionco/react-doctor

10 of 12 projects failed to build with the old tsc and were ignored

packages/oxlint-plugin-react-doctor/tsconfig.json

packages/evals/tsconfig.json

mindfold-ai/Trellis

1 of 2 projects failed to build with the old tsc and were ignored

packages/cli/tsconfig.json

modelcontextprotocol/inspector

4 of 10 projects failed to build with the old tsc and were ignored

clients/cli/tsconfig.test.json

clients/cli/tsconfig.json

modelcontextprotocol/typescript-sdk

3 of 19 projects failed to build with the old tsc and were ignored

packages/codemod/tsconfig.json

examples/tsconfig.json

nanocoai/nanoclaw

1 of 2 projects failed to build with the old tsc and were ignored

tsconfig.json

NapNeko/NapCatQQ

14 of 23 projects failed to build with the old tsc and were ignored

packages/napcat-shell/tsconfig.json

Narcooo/inkos

3 of 5 projects failed to build with the old tsc and were ignored

packages/core/tsconfig.json

packages/cli/tsconfig.json

neoclide/coc.nvim

tsconfig.test.json

tsconfig.json

@typescript-automation

Copy link
Copy Markdown

Wesley Wigham (@weswigham) Here are some more interesting changes from running the top 1000 repos suite

Details

nexu-io/open-design

23 of 52 projects failed to build with the old tsc and were ignored

packages/release/tsconfig.tests.json

  • error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"prerelease" | "stable", ReleaseChannelDescriptor>'.

packages/release/tsconfig.json

  • error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"prerelease" | "stable", ReleaseChannelDescriptor>'.

packages/host/tsconfig.tests.json

packages/host/tsconfig.json

packages/agui-adapter/tsconfig.tests.json

packages/agui-adapter/tsconfig.json

apps/web/tsconfig.json

apps/desktop/tsconfig.tests.json

apps/desktop/tsconfig.json

apps/daemon/tsconfig.tests.json

apps/daemon/tsconfig.json

nolimits4web/swiper

4 of 6 projects failed to build with the old tsc and were ignored

tsconfig.json

tsconfig.emit.json

NVIDIA/NemoClaw

3 of 9 projects failed to build with the old tsc and were ignored

tools/mcp-tool-discovery-runtime/tsconfig.json

paperclipai/paperclip

12 of 35 projects failed to build with the old tsc and were ignored

tests/runner-e2e/tsconfig.json

tests/runner-acceptance/tsconfig.json

packages/plugins/plugin-llm-wiki/tsconfig.json

packages/paperclip-runner/tsconfig.surfaces.json

packages/adapters/kimi-local/tsconfig.json

packages/adapters/grok-local/tsconfig.json

packages/adapters/gemini-local/tsconfig.json

packages/adapters/cursor-cloud/tsconfig.json

@typescript-automation

Copy link
Copy Markdown

Wesley Wigham (@weswigham) Here are some more interesting changes from running the top 1000 repos suite

Details

presenton/presenton

servers/nextjs/tsconfig.json

servers/nextjs/tsconfig.codex-check.json

RaspberryPiFoundation/blockly

35 of 36 projects failed to build with the old tsc and were ignored

packages/blockly/tsconfig.json

recharts/recharts

3 of 5 projects failed to build with the old tsc and were ignored

test-vr/tsconfig.json

test/tsconfig.json

refined-github/refined-github

tsconfig.json

rmyndharis/OpenWA

1 of 7 projects failed to build with the old tsc and were ignored

tsconfig.json

tsconfig.build.json

RSSNext/Folo

2 of 20 projects failed to build with the old tsc and were ignored

packages/internal/utils/tsconfig.json

packages/internal/store/tsconfig.json

packages/internal/components/tsconfig.json

packages/internal/atoms/tsconfig.json

apps/ssr/tsconfig.json

apps/ota/tsconfig.json

apps/mobile/tsconfig.json

apps/mobile/web-app/html-renderer/tsconfig.json

apps/landing/tsconfig.json

apps/cli/tsconfig.json

sirmalloc/ccstatusline

tsconfig.json

@typescript-automation

Copy link
Copy Markdown

Wesley Wigham (@weswigham) Here are some more interesting changes from running the top 1000 repos suite

Details

stablyai/orca

13 of 22 projects failed to build with the old tsc and were ignored

cloud/apps/relay/tsconfig.json

cloud/apps/relay/tsconfig.build.json

config/tsconfig.tc.web.json

config/tsconfig.tc.cli.json

config/tsconfig.cli.json

teableio/teable

144 of 147 projects failed to build with the old tsc and were ignored

packages/sdk/tsconfig.json

thedotmack/claude-mem

tsconfig.json

src/ui/viewer/tsconfig.json

thesysdev/openui

45 of 51 projects failed to build with the old tsc and were ignored

packages/openui-cli/tsconfig.json

@typescript-automation

Copy link
Copy Markdown

Wesley Wigham (@weswigham) Here are some more interesting changes from running the top 1000 repos suite

Details

tldraw/tldraw

6 of 36 projects failed to build with the old tsc and were ignored

templates/socketio-server-example/tsconfig.json

templates/simple-server-example/tsconfig.json

templates/agent/tsconfig.json

packages/namespaced-tldraw/tsconfig.json

packages/collaboration/tsconfig.json

internal/scripts/tsconfig.json

apps/vscode/extension/tsconfig.json

apps/vscode/editor/tsconfig.json

@typescript-automation

Copy link
Copy Markdown

Wesley Wigham (@weswigham) Here are some more interesting changes from running the top 1000 repos suite

Details

trailhq/Graft

tsconfig.json

triggerdotdev/trigger.dev

46 of 67 projects failed to build with the old tsc and were ignored

internal-packages/dashboard-agent-db/tsconfig.json

umami-software/umami

1 of 2 projects failed to build with the old tsc and were ignored

tsconfig.tracker.types.json

usekaneo/kaneo

1 of 8 projects failed to build with the old tsc and were ignored

apps/site/tsconfig.json

apps/api/tsconfig.json

vercel-labs/deepsec

2 of 6 projects failed to build with the old tsc and were ignored

packages/scanner/tsconfig.json

packages/processor/tsconfig.json

packages/deepsec/tsconfig.json

VickScarlet/remake

6 of 9 projects failed to build with the old tsc and were ignored

packages/condition/tsconfig.json

video-dev/hls.js

1 of 2 projects failed to build with the old tsc and were ignored

tsconfig.json

vrtmrz/obsidian-livesync

tsconfig.json

src/apps/webapp/tsconfig.json

VSCodeVim/Vim

tsconfig.json

  • error TS2367: This comparison appears to be unintentional because the types 'string & not "c" & not "C" & not "x" & not "X" & not "o"' and '"o"' have no overlap.

web-infra-dev/midscene

37 of 50 projects failed to build with the old tsc and were ignored

packages/shared/tsconfig.build.json

packages/shared/tests/tsconfig.json

packages/core/tsconfig.build.json

packages/core/tests/tsconfig.json

apps/studio/tsconfig.build.json

webadderallorg/Recordly

tsconfig.json

wonderwhy-er/DesktopCommanderMCP

tsconfig.json

Yeachan-Heo/oh-my-claudecode

tsconfig.json

Yeachan-Heo/oh-my-codex

tsconfig.no-unused.json

tsconfig.json

yoavbls/pretty-ts-errors

1 of 2 projects failed to build with the old tsc and were ignored

tsconfig.json

@weswigham

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) test top1000
TypeScript Bot (@typescript-bot) run dt

@typescript-automation

typescript-automation Bot commented Sep 16, 2026

Copy link
Copy Markdown

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
test top1000 ✅ Started 👀 Results
run dt ✅ Started

@typescript-automation

Copy link
Copy Markdown

Wesley Wigham (@weswigham) Here are the results of running the top 1000 repos with tsc comparing main and refs/pull/63926/merge:

Something interesting changed - please have a look.

Details

advaitpaliwal/feynman

1 of 4 projects failed to build with the old tsc and were ignored

tsconfig.json

workbench-web/tsconfig.json

alibaba/hooks

2 of 4 projects failed to build with the old tsc and were ignored

packages/hooks/tsconfig.pro.json

packages/hooks/tsconfig.json

anthropics/claude-code

mods/tsconfig.json

@typescript-automation

Copy link
Copy Markdown

Wesley Wigham (@weswigham) Here are some more interesting changes from running the top 1000 repos suite

Details

corsairdev/corsair

85 of 329 projects failed to build with the old tsc and were ignored

tsconfig.json

packages/zoominfo/tsconfig.json

packages/zohoinventory/tsconfig.json

packages/youcom/tsconfig.json

packages/xquik/tsconfig.json

packages/worldnewsapi/tsconfig.json

packages/workiom/tsconfig.json

packages/workday/tsconfig.json

packages/wiza/tsconfig.json

packages/wix/tsconfig.json

packages/witai/tsconfig.json

packages/whatsapp/tsconfig.json

packages/webvizio/tsconfig.json

packages/webflow/tsconfig.json

packages/wakatime/tsconfig.json

packages/vestaboard/tsconfig.json

packages/veriphone/tsconfig.json

packages/uploadcare/tsconfig.json

packages/uniswapapi/tsconfig.json

packages/unione/tsconfig.json

packages/ui/tsconfig.json

packages/ui/tsconfig.build.json

packages/twilio/tsconfig.json

packages/twentyonerisk/tsconfig.json

packages/toggl/tsconfig.json

packages/tisane/tsconfig.json

packages/tinyurl/tsconfig.json

packages/timelink/tsconfig.json

packages/timecamp/tsconfig.json

packages/ticktick/tsconfig.json

packages/textrazor/tsconfig.json

packages/synthflowai/tsconfig.json

packages/supabase/tsconfig.json

packages/studiobyai21labs/tsconfig.json

packages/studio/tsconfig.build.json

packages/streamtime/tsconfig.json

packages/sourcegraph/tsconfig.json

packages/serpapi/tsconfig.json

packages/sendgrid/tsconfig.json

packages/securitytrails/tsconfig.json

packages/scrapegraphai/tsconfig.json

packages/scaleai/tsconfig.json

packages/sapsuccessfactors/tsconfig.json

packages/salesforce/tsconfig.json

packages/runpod/tsconfig.json

packages/retailed/tsconfig.json

packages/removebg/tsconfig.json

packages/reddit/tsconfig.json

packages/pinecone/tsconfig.json

packages/perplexityai/tsconfig.json

packages/pdfmonkey/tsconfig.json

packages/parseur/tsconfig.typecheck.json

packages/parseur/tsconfig.json

packages/openrouter/tsconfig.json

packages/onepassword/tsconfig.json

packages/ollama/tsconfig.json

packages/ocrwebservice/tsconfig.json

packages/ocrspace/tsconfig.json

packages/nextdns/tsconfig.json

packages/neon/tsconfig.json

packages/merriamwebsterdict/tsconfig.json

packages/mcp/tsconfig.json

packages/mcp/tsconfig.build.json

packages/marketstack/tsconfig.json

packages/mailtrap/tsconfig.json

packages/mailchimp/tsconfig.json

packages/loyverse/tsconfig.json

packages/linkedin/tsconfig.json

packages/kibana/tsconfig.json

packages/kaggle/tsconfig.json

packages/jigsawstack/tsconfig.json

packages/instagram/tsconfig.json

packages/insightoai/tsconfig.json

packages/imgbb/tsconfig.json

packages/huggingface/tsconfig.json

packages/htmltoimage/tsconfig.typecheck.json

packages/htmltoimage/tsconfig.json

packages/heygen/tsconfig.json

packages/here/tsconfig.json

packages/hashnode/tsconfig.json

packages/harvest/tsconfig.json

packages/habitica/tsconfig.json

packages/groqcloud/tsconfig.json

packages/googlemaps/tsconfig.json

packages/googlecloudvision/tsconfig.json

packages/googlebigquery/tsconfig.json

packages/googleanalytics/tsconfig.json

packages/googleaddressvalidation/tsconfig.json

packages/gladia/tsconfig.json

packages/gemini/tsconfig.json

packages/formbricks/tsconfig.json

packages/flexisign/tsconfig.json

packages/filloutforms/tsconfig.json

packages/faraday/tsconfig.json

packages/facebook/tsconfig.json

packages/exist/tsconfig.json

packages/epicgames/tsconfig.json

packages/emelia/tsconfig.json

packages/dynapictures/tsconfig.json

packages/dropboxsign/tsconfig.json

packages/dripcel/tsconfig.json

packages/dreamstudio/tsconfig.json

packages/doppler/tsconfig.json

packages/dockerhub/tsconfig.json

packages/digitalocean/tsconfig.json

packages/diffbot/tsconfig.json

packages/devinmcp/tsconfig.json

packages/deepseek/tsconfig.json

packages/datarobot/tsconfig.json

packages/datadog/tsconfig.json

  • error TS2322: Type 'unknown' is not assignable to type 'string | number | boolean'.
    • [packages/corsair/core/inspect/index.
      :error: Truncated - see log for full output :error:

@typescript-automation

Copy link
Copy Markdown

Wesley Wigham (@weswigham) Here are some more interesting changes from running the top 1000 repos suite

Details

diegosouzapw/OmniRoute

3 of 10 projects failed to build with the old tsc and were ignored

tsconfig.typecheck-noimplicit-core.json

tsconfig.typecheck-core.json

open-sse/tsconfig.json

ether/etherpad

1 of 4 projects failed to build with the old tsc and were ignored

src/tsconfig.json

fluxerapp/fluxer

21 of 43 projects failed to build with the old tsc and were ignored

fluxer_api/tsconfig.json

fluxer_api/pkgs/kv_client/tsconfig.json

getagentseal/codeburn

3 of 5 projects failed to build with the old tsc and were ignored

tsconfig.json

  • error TS2367: This comparison appears to be unintentional because the types 'number & not 34' and '34' have no overlap.

getpaseo/paseo

12 of 17 projects failed to build with the old tsc and were ignored

packages/website/tsconfig.json

getsentry/sentry-javascript

292 of 359 projects failed to build with the old tsc and were ignored

packages/core/tsconfig.types.json

packages/core/tsconfig.json

graphql/graphql-js

3 of 4 projects failed to build with the old tsc and were ignored

tsconfig.json

homebridge/homebridge

tsconfig.typecheck.json

  • error TS2367: This comparison appears to be unintentional because the types '"closureControl" | "colorControl" | "levelControl" | "mediaPlayback" | "thermostat" | (string & not "rvcCleanMode" & not "serviceArea" & not "powerSource")' and '"serviceArea"' have no overlap.

tsconfig.json

  • error TS2367: This comparison appears to be unintentional because the types '"closureControl" | "colorControl" | "levelControl" | "mediaPlayback" | "thermostat" | (string & not "rvcCleanMode" & not "serviceArea" & not "powerSource")' and '"serviceArea"' have no overlap.

hyperdxio/hyperdx

5 of 9 projects failed to build with the old tsc and were ignored

packages/common-utils/tsconfig.json

krillinai/OpenCreator

3 of 11 projects failed to build with the old tsc and were ignored

apps/daemon/tsconfig.test.json

  • error TS2322: Type '{}' is not assignable to type '"danger-full-access" | "workspace-write" | undefined'.
  • error TS2367: This comparison appears to be unintentional because the types 'string & not ".jpg" & not ".jpeg" & not ".png" & not ".webp" & not ".srt" & not ".md" & not ".mp4" & not ".webm" & not ".mp3" & not ".wav" & not ".m4a"' and '".md"' have no overlap.

apps/daemon/tsconfig.json

  • error TS2322: Type '{}' is not assignable to type '"danger-full-access" | "workspace-write" | undefined'.
  • error TS2367: This comparison appears to be unintentional because the types 'string & not ".jpg" & not ".jpeg" & not ".png" & not ".webp" & not ".srt" & not ".md" & not ".mp4" & not ".webm" & not ".mp3" & not ".wav" & not ".m4a"' and '".md"' have no overlap.

liketrek/TREK

5 of 7 projects failed to build with the old tsc and were ignored

plugin-sdk/tsconfig.json

MemTensor/MemOS

5 of 9 projects failed to build with the old tsc and were ignored

apps/memos-local-plugin/tsconfig.json

apps/memos-local-plugin/tsconfig.build.json

microsoft/fast

7 of 13 projects failed to build with the old tsc and were ignored

packages/fast-element/tsconfig.json

packages/fast-element/tsconfig.api-extractor.json

packages/fast-element/test/tsconfig.json

millionco/react-doctor

10 of 12 projects failed to build with the old tsc and were ignored

packages/oxlint-plugin-react-doctor/tsconfig.json

mindfold-ai/Trellis

1 of 2 projects failed to build with the old tsc and were ignored

packages/cli/tsconfig.json

Narcooo/inkos

3 of 5 projects failed to build with the old tsc and were ignored

packages/core/tsconfig.json

nexu-io/open-design

23 of 52 projects failed to build with the old tsc and were ignored

packages/host/tsconfig.tests.json

packages/host/tsconfig.json

apps/web/tsconfig.json

apps/desktop/tsconfig.json

apps/daemon/tsconfig.tests.json

apps/daemon/tsconfig.json

paperclipai/paperclip

13 of 36 projects failed to build with the old tsc and were ignored

tests/runner-e2e/tsconfig.json

tests/runner-acceptance/tsconfig.json

packages/paperclip-runner/tsconfig.surfaces.json

packages/adapters/kimi-local/tsconfig.json

packages/adapters/grok-local/tsconfig.json

packages/adapters/gemini-local/tsconfig.json

packages/adapters/cursor-cloud/tsconfig.json

presenton/presenton

servers/nextjs/tsconfig.json

servers/nextjs/tsconfig.codex-check.json

recharts/recharts

3 of 5 projects failed to build with the old tsc and were ignored

test-vr/tsconfig.json

test/tsconfig.json

sirmalloc/ccstatusline

tsconfig.json

stablyai/orca

13 of 22 projects failed to build with the old tsc and were ignored

config/tsconfig.tc.web.json

config/tsconfig.tc.cli.json

config/tsconfig.cli.json

teableio/teable

144 of 147 projects failed to build with the old tsc and were ignored

packages/sdk/tsconfig.json

vercel-labs/deepsec

2 of 6 projects failed to build with the old tsc and were ignored

packages/scanner/tsconfig.json

packages/processor/tsconfig.json

packages/deepsec/tsconfig.json

vrtmrz/obsidian-livesync

src/apps/webapp/tsconfig.json

VSCodeVim/Vim

tsconfig.json

  • error TS2367: This comparison appears to be unintentional because the types 'string & not "c" & not "C" & not "x" & not "X" & not "o"' and '"o"' have no overlap.

wonderwhy-er/DesktopCommanderMCP

tsconfig.json

Yeachan-Heo/oh-my-claudecode

tsconfig.json

  • error TS2367: This comparison appears to be unintentional because the types 'string & not "?" & not " "' and '"?"' have no overlap.

Yeachan-Heo/oh-my-codex

tsconfig.no-unused.json

  • error TS2367: This comparison appears to be unintentional because the types 'string & not "help" & not "--help" & not "-h" & not "create" & not "create-goals" & not "status" & not "add-goal" & not "steer" & not "record-review-blockers" & not "complete" & not "complete-goals" & not "next" & not "start-next"' and '"steer"' have no overlap.
  • error TS2367: This comparison appears to be unintentional because the types 'string & not "\u001B[0m"' and '"\u001B[0m"' have no overlap.
  • error TS2367: This comparison appears to be unintentional because the types 'string & not "node_modules/.bin/omx" & not "dist/cli/omx.js"' and '"dist/cli/omx.js"' have no overlap.
  • error TS2322: Type '{}' is not assignable to type '"aggregate" | "per_story"'.

tsconfig.json

  • error TS2367: This comparison appears to be unintentional because the types 'string & not "help" & not "--help" & not "-h" & not "create" & not "create-goals" & not "status" & not "add-goal" & not "steer" & not "record-review-blockers" & not "complete" & not "complete-goals" & not "next" & not "start-next"' and '"steer"' have no overlap.
  • error TS2367: This comparison appears to be unintentional because the types 'string & not "\u001B[0m"' and '"\u001B[0m"' have no overlap.
  • error TS2367: This comparison appears to be unintentional because the types 'string & not "node_modules/.bin/omx" & not "dist/cli/omx.js"' and '"dist/cli/omx.js"' have no overlap.
  • error TS2322: Type '{}' is not assignable to type '"aggregate" | "per_story"'.

@weswigham

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) test top1000

Hoping for less than a page this time~

@typescript-automation

typescript-automation Bot commented Sep 17, 2026

Copy link
Copy Markdown

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
test top1000 ✅ Started

@jakebailey

Copy link
Copy Markdown
Member

The user test runner was using an old version of node; fixed and now rerun:

TypeScript Bot (@typescript-bot) test top1000

@typescript-automation

typescript-automation Bot commented Sep 17, 2026

Copy link
Copy Markdown

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
test top1000 ✅ Started

@weswigham

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) test top1000 because it looks like go install failed on a worker :(

@typescript-automation

Copy link
Copy Markdown

Hey Wesley Wigham (@weswigham), this PR changed while I was preparing the test run. Please try again.

@jakebailey

Copy link
Copy Markdown
Member

No it didn't, ha, I'll look into that

@weswigham

Copy link
Copy Markdown
Member Author

Superseded by #64375, since I can only stack PRs actually on the repo, and not from forks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Conditional type doesn't narrow primitive types

4 participants