tc39 / proposal-extractors

Extractors for ECMAScript
http://tc39.es/proposal-extractors/
MIT License
200 stars 3 forks source link

Add initial specification text #12

Closed rbuckton closed 5 months ago

rbuckton commented 5 months ago

Initial specification text for Extractors.

Fixes: #3

/cc: Pattern Matching champions for review.

github-actions[bot] commented 5 months ago

A preview of this PR can be found at https://tc39.es/proposal-extractors/pr/12.

Jack-Works commented 5 months ago

InvokeCustomMatcherOrThrow step 6

  1. Let iteratorRecord be ? GetIterator(result, SYNC).

then BindingInitialization

  1. Let obj be ? InvokeCustomMatcherOrThrow(extractor, value, receiver).
  2. Let iteratorRecord be ? GetIterator(obj, sync).

looks like you called GetIterator twice or with the wrong object?

rbuckton commented 5 months ago

looks like you called GetIterator twice or with the wrong object?

Fixed, thanks!