-
Notifications
You must be signed in to change notification settings - Fork 15
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
Proposal: record-tuple-polyfill #120
Comments
@mister-what Thanks for bringing this to my attention! I haven't had a chance to dig into the details of the If I had to speculate about the difference between the two approaches, the In a In other words, if all you have is Finally, I can't make any promises that these With all of that said, I'm open to pursuing your idea of a |
Hi @benjamn, But: the Bloomberg polyfills already have a test-suite that might provide a good baseline. Writing a generic test suite for any Record or Tuple implementation/polyfill should be very feasible.
|
Babel recently introduced a support for the Record and Tuple ECMAScript proposal. Babel currently uses
@bloomberg/record-tuple-polyfill
as the underling implementation. But I was wondering how this compares to@wry/record
and@wry/tuple
and wether they would be usable as an alternative polyfill?I'm favoring
@wry/record
and@wry/tuple
from an implementation perspective. Correct me if I'm wrong, but@bloomberg/record-tuple-polyfill
seems to be unnecessary complex and convoluted in comparison.I'd like to propose a new package
@wry/record-tuple-polyfill
if semantic-, API- and formal compatibility are given.(Non exhaustive) list of requirements for this proposed package:
Tuple
from@wry/tuple
andRecord
from@wry/record
@bloomberg/record-tuple-polyfill
Requirement 1. should be trivial to do. It will be something like this:
Meeting the second requirement might be a little bit more tricky. I think a property based testing approach could give the strongest guarantees here.
Not sure if the benchmark suite should be rather a precondition for publishing the new package or if is a rather a stretch goal.
(any input/discussion is very appreciated)
The text was updated successfully, but these errors were encountered: