elysiajs / elysia

Ergonomic Framework for Humans
https://elysiajs.com
MIT License
10.63k stars 226 forks source link

t.Date() type in Elysia.js results in Date & string in Eden, causing type mismatch #912

Open k3341095 opened 2 weeks ago

k3341095 commented 2 weeks ago

What version of Elysia is running?

1.1.24

What platform is your computer?

ubuntu 22.04

What steps can reproduce the bug?

Hello,

I'm currently using Elysia.js, and I’ve run into an issue with the t.Date() type. When I define a field with t.Date(), Eden interprets this type as Date & string, making it difficult to work with due to a type mismatch.

I need some guidance on how to handle this situation or if there’s a workaround to ensure compatibility between the types in Elysia.js and Eden. Any assistance on how to resolve this type discrepancy would be greatly appreciated.

Thank you!

What is the expected behavior?

date | string

What do you see instead?

Date & string

Additional information

No response

Have you try removing the node_modules and bun.lockb and try again yet?

No response