-
Notifications
You must be signed in to change notification settings - Fork 13.4k
mongodb broken by #41821 #46228
Copy link
Copy link
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
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
mongodb has a mapped type
SetFieldsthat calls a conditional typeFlatten. Before #41821,Flattenpropagated its constraint from its argument to its return type. Now it does not.To reproduce:
npm i mongodb@4.1.2import mongodb = require("mongodb")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.