Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 705f259

Browse filesBrowse files
committed
doc: split example into two
This makes sure the "good" and "bad" examples are split into two. Otherwise it'll result in an parse error. PR-URL: #27670 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
1 parent 69af43e commit 705f259
Copy full SHA for 705f259

File tree

Expand file treeCollapse file tree

1 file changed

+5
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-4
lines changed
Open diff view settings
Collapse file

‎doc/api/cli.md‎

Copy file name to clipboardExpand all lines: doc/api/cli.md
+5-4Lines changed: 5 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -218,22 +218,23 @@ or be removed in the future.
218218

219219
To avoid these cases, any builtin function overrides should be defined upfront:
220220

221-
<!-- eslint-disable no-redeclare -->
222221
```js
223222
const o = {};
224223
// THROWS: Cannot assign read only property 'toString' of object
225224
o.toString = () => 'string';
226225

227-
// OK
228-
const o = { toString: () => 'string' };
229-
230226
class X {
231227
constructor() {
232228
this.toString = () => 'string';
233229
}
234230
}
235231
// THROWS: Cannot assign read only property 'toString' of object
236232
new X();
233+
```
234+
235+
```js
236+
// OK
237+
const o = { toString: () => 'string' };
237238

238239
class X {
239240
toString = undefined;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.