Skip to content

$fetch infered type for Date is wrong #2689

@offizium-berndstorath

Description

@offizium-berndstorath

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

nuxt/nuxt#28674

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions