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

No TypeScript errors on improper use of dateTime.with #1214

Closed
kavsingh opened this issue Nov 22, 2020 · 2 comments
Closed

No TypeScript errors on improper use of dateTime.with #1214

kavsingh opened this issue Nov 22, 2020 · 2 comments
Labels
typescript Related to the TypeScript bindings
Milestone

Comments

@kavsingh
Copy link

kavsingh commented Nov 22, 2020

When passing a plain date time to dateTime.with (zoned and plain dateTime) there are runtime errors thrown, but no TypeScript errors are raised. The runtime exceptions seem to be expected as per current docs and are fixed by using .withPlainTime

image

Example repo: https://github.com/kavsingh/temporal-types-example

typescript 4.1.2
proposal-temporal 0.6.0
@ryzokuken
Copy link
Member

This change was fairly recent, we disallowed the use of timeZone (in case of ZonedDateTime) and calendar (in case of both Plain and Zoned) in the with method. Would you like to make a PR to fix the types?

@ptomato
Copy link
Collaborator

ptomato commented Jan 2, 2023

This no longer applies to this repo. Polyfills should decide this for themselves.

@ptomato ptomato closed this as completed Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typescript Related to the TypeScript bindings
Projects
None yet
Development

No branches or pull requests

3 participants