TheSpyder / rescript-webapi

ReScript bindings to the DOM and other Web APIs
http://tinymce.github.io/rescript-webapi/api/Webapi/
Other
151 stars 37 forks source link

Temporal bindings #76

Open tom-sherman opened 2 years ago

tom-sherman commented 2 years ago

https://tc39.es/proposal-temporal/docs

Currently incomplete, need to clean the rest up before committing them.

Couple of questions on approach:

I've skipped APIs that rely on bigints, I think official support need to land for these (at least in the form of a type in the stdlib) before adding bindings. See https://github.com/rescript-lang/rescript-compiler/issues/4677

I've also skipped toLocaleString bindings as I think we should add general Intl bindings first (#77)

TheSpyder commented 2 years ago

Regarding BigInt, maybe we consider pulling in rescript-js. That might be a bit heavy-handed, though, to force webapi users to adopt the alternative Js implementation as well if they want to make use of the BigInt functions.