[WIP] Implementing TC39 signal polyfill with tansu#145
Draft
divdavem wants to merge 9 commits intoAmadeusITGroup:masterfrom
Draft
[WIP] Implementing TC39 signal polyfill with tansu#145divdavem wants to merge 9 commits intoAmadeusITGroup:masterfrom
divdavem wants to merge 9 commits intoAmadeusITGroup:masterfrom
Conversation
…ve during the call
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #145 +/- ##
===========================================
- Coverage 100.00% 97.72% -2.28%
===========================================
Files 16 18 +2
Lines 856 1098 +242
Branches 133 183 +50
===========================================
+ Hits 856 1073 +217
- Misses 0 21 +21
- Partials 0 4 +4 ☔ View full report in Codecov by Sentry. |
5a4825b to
a28d5a1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note that this implementation differs a bit from the current TC39 specifications to take into account the issues I opened:
Signal.subtle.watched/unwatchedcallbacks are not only called when a signal is watched/unwatched but also when a signal is read (cf this issue)In this PR I have imported the tests from the official polyfill but I have disabled/updated some of them because of the above changes. I have also added some other tests.
I don't like the changes I have added in the last commit. I think calling
watchon a watcher should also update the watched signals, as suggested here and implemented in #146.