nitro icon indicating copy to clipboard operation
nitro copied to clipboard

`$fetch` infered type for `Date` is wrong

Open offizium-berndstorath opened this issue 1 year ago • 1 comments

Environment

Node v20.15.0

Reproduction

https://github.com/offizium-berndstorath/nitro-repro https://stackblitz.com/~/github.com/offizium-berndstorath/nitro-repro?file=server/utils/test.ts

Describe the bug

If you return a Date from a api route the type doesn't get converted to string. But only if its inside an array

Additional context

https://github.com/nuxt/nuxt/issues/28674

Logs

No response

offizium-berndstorath avatar Aug 23 '24 10:08 offizium-berndstorath

@danielroe @pi0 any update?

kaaax0815 avatar Sep 03 '24 13:09 kaaax0815

Lets track with https://github.com/nitrojs/nitro/issues/2758

pi0 avatar Jan 07 '25 17:01 pi0