mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-28 06:53:42 +08:00
Each limitations partial held its whole text on one line (map-and-set.mdx was a single 1,080-character line), so any two edits to the same partial conflicted. The partials now put one sentence per line, with a bullet's continuation lines indented two spaces. Markdown joins the lines, so the rendered pages are unchanged. scripts/limitations-partials.mjs reads a labeled bullet's indented continuation lines as part of the bullet when it splits and joins the page, and AGENTS.md states the convention.
7 lines
799 B
Plaintext
7 lines
799 B
Plaintext
- **Error causes:** Accessor constructor options are unsupported.
|
|
Subclasses may redeclare `cause` as `unknown` or `object` (for example `cause?: unknown`), which defines the own property after `super()` returns as Node does; redeclarations with other types, parameter properties, and accessors named `cause` are unsupported.
|
|
`Error`, `TypeError`, `RangeError`, and `SyntaxError` otherwise accept `{ cause }`, including through inherited constructors.
|
|
Reads, writes, deletion, and `"cause" in error` distinguish an absent cause from an explicitly undefined cause.
|
|
Constructor causes are non-enumerable; assignment to an absent cause creates an enumerable property.
|
|
Property descriptors and checked-value aliases share the cause, including getters and setters installed after construction.
|