-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
Remove all @@notation in JS prose #34817
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a very few questions / things to confirm.
@@ -21,7 +21,7 @@ new WeakMap(iterable) | |||
### Parameters | |||
|
|||
- `iterable` | |||
- : An [`Array`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) or other iterable object that implements an [@@iterator](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/@@iterator) method that returns an iterator object that produces a two-element array-like object whose first element is a value that will be used as a `WeakMap` key and whose second element is the value to associate with that key. Each key-value pair will be added to the new `WeakMap`. null is treated as undefined. | |||
- : An [`Array`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) or other iterable object that implements an [Symbol.iterator](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/@@iterator) method that returns an iterator object that produces a two-element array-like object whose first element is a value that will be used as a `WeakMap` key and whose second element is the value to associate with that key. Each key-value pair will be added to the new `WeakMap`. null is treated as undefined. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need a ()
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch. I was search&replacing all [@@xxx](
and it managed to match this.
@@ -19,11 +19,11 @@ TypedArray[Symbol.species] | |||
|
|||
### Return value | |||
|
|||
The value of the constructor (`this`) on which `get @@species` was called. The return value is used to construct return values from typed array methods that create new typed arrays. | |||
The value of the constructor (`this`) on which `get [Symbol.species]` was called. The return value is used to construct return values from typed array methods that create new typed arrays. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value of the constructor (`this`) on which `get [Symbol.species]` was called. The return value is used to construct return values from typed array methods that create new typed arrays. | |
The value of the constructor (`this`) on which `get [Symbol.species]()` was called. The return value is used to construct return values from typed array methods that create new typed arrays. |
not sure if the parens are needed. just want to be sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No; this is not a method, but a property.
@@ -64,7 +64,7 @@ console.log(arrIter.next().value); // 50 | |||
|
|||
## See also | |||
|
|||
- [Polyfill of `TypedArray.prototype[@@iterator]` in `core-js`](https://github.com/zloirock/core-js#ecmascript-typed-arrays) | |||
- [Polyfill of `TypedArray.prototype[Symbol.iterator]` in `core-js`](https://github.com/zloirock/core-js#ecmascript-typed-arrays) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this has been supported for a long time. can we remove the pollyfill?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No; we don't remove core-js polyfills. We have reached consensus on that since this is the least-disruptive way to make the content still useful. Polyfills are not only useful for backwards compatibility; they also fix bugs.
files/en-us/web/javascript/reference/global_objects/symbol/isconcatspreadable/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/javascript/reference/global_objects/symbol/index.md
Outdated
Show resolved
Hide resolved
|
||
{{js_property_attributes(0, 0, 0)}} | ||
|
||
## Examples | ||
|
||
### User-defined async iterables | ||
|
||
You can define your own async iterable by setting the `[Symbol.asyncIterator]` property on an object. | ||
You can define your own async iterable by setting the `[Symbol.asyncIterator]()` property on an object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure about parenthesis on this property?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. This one is a method.
Estelle you have great eyes 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 🎉
Part of mdn/mdn#562. I'm sending this as one monolithic PR, because I don't think it's helpful to merge "parts" of this PR. Please review as much and as little as you want and use the incremental review features.