Open
Description
Environment information
Version: 5.0.1 (latest)
Platform: Windows 10 (x86_64)
Node.js version: 22.14.0
TypeScript version: 5.5.4
What steps will reproduce the bug?
const getData = async (): Promise<Record<string, string>> => {
return { hello: "world" };
};
router.get("/test", (_req, res) => {
res.json(getData());
});
This compiles successfully but the response will be {}
.
I expected either a compiler error or for the response to be {"hello":"world"}
.