-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
Recent RegressionThis is a new regression just found in the last major/minor version of TypeScript.This 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 bugThe behavior described is the intended behavior; this is not a bug
Milestone
Description
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:
npm i mongodb@4.1.2- Create a tsconfig with index.ts and strict: true.
- In index.ts,
import mongodb = require("mongodb") - 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.
uhyo
Metadata
Metadata
Assignees
Labels
Recent RegressionThis is a new regression just found in the last major/minor version of TypeScript.This 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 bugThe behavior described is the intended behavior; this is not a bug