Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support DateConstructor #71

Open
jim-lub opened this issue Oct 19, 2022 · 0 comments
Open

Support DateConstructor #71

jim-lub opened this issue Oct 19, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@jim-lub
Copy link
Contributor

jim-lub commented Oct 19, 2022

I'm not sure this if is something that should be supported, but I'm just dropping it here to atleast start of the discussion. I'm not sure if this is specific to the DateConstructor though.

The reason I'd like to see this supported? Prisma exposes this type internally in their generated typings. We are now unable to use these types directly as a return types in our functions, because we get the following error:

error TS-PheroError:
S145: ParserModel not implemented yet: `Date` (kind:178)

This is a minimale example to reproduce:

type Fred = {
  createdAt: DateConstructor
}

export async function aad(): Promise<Fred> {
  return {
    createdAt: Date,
  }
}
@jim-lub jim-lub added the enhancement New feature or request label Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant