Skip to content

mongodb broken by #41821 #46228

Closed
Closed
@sandersn

Description

@sandersn

mongodb has a mapped type SetFields that calls a conditional type Flatten. Before #41821, Flatten propagated its constraint from its argument to its return type. Now it does not.

To reproduce:

  1. npm i mongodb@4.1.2
  2. Create a tsconfig with index.ts and strict: true.
  3. In index.ts, import mongodb = require("mongodb")
  4. Error in mongodb.d.ts on line 5233.

I'll see if I can create a standalone repro.
If this error is intended, we need to provide a fix for mongodb so they don't break when people start using 4.5.

Metadata

Metadata

Assignees

Labels

Recent RegressionThis is a new regression just found in the last major/minor version of TypeScript.Working as IntendedThe behavior described is the intended behavior; this is not a bug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions