Closed
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.