Open nekevss opened 5 months ago
From https://github.com/boa-dev/temporal/pull/84#discussion_r1681400717:
I think the spec API is fine, but in my opinion the APIs should be adapted to the explicitness of Rust APIs instead of having a 1-1 equivalent in both, which in this case means having some function that people can call to get the calendar before calling the function, instead of filling the API with generics. This is partly because any APIs that have generics in them will make it really difficult to implement FFI interfaces for them.
Currently, parameters on some calls differ a tad from specification. Instead of supporting a "Like" item, we take specific values. Ideally, these should be updated to the below.
temporalDateLike
toInto<Date>
temporalDurationLike
toInto<Duration>
temporalTimeZoneLike
toInto<TimeZone>