Rule 13.10
On this page

Rule 13.10

Chapter 13, Change control Test

A change that keeps a program compiling and makes it compute something else must ship in two steps, and the second must come no earlier than the next breaking release after the first step’s release was published (the next minor before 1.0.0, the next major after it). First, a published release must report every affected line as a category: 'warning' diagnostic behind the opt-in deprecation option (compile(src, { deprecations: true }), tshc check --deprecations), naming the edit that keeps today’s meaning, with no emitted byte moved with the option on or off. Then the default changes, the warning and its code are retired, a ### Changed entry names the old meaning, the new one and the one-line edit that keeps the old, and every example golden is re-baked and reviewed. The window is counted in published releases. From 1.0.0, a spelling or an export that will be removed must get the same window: the spelling warns under the same option, and the export carries @deprecated in its JSDoc naming its replacement.

The rule text and the parts under it are the compiler's own English, as the design document writes them.

Rationale

a program that stops compiling says so, with its fix (Rule 12.1); a program that computes something else says nothing, and a shader is where a silent change is hardest to see. A warning that never reached npm warned nobody.

Derives from

RELEASING.md#7-versions-and-deprecations; changes/0010-versions-and-deprecation-window.md; #148, the first change to take the window.

How it is verified

Checked by a test. A test, a gate script or a CI workflow names this rule, and the traceability check fails when a file listed below stops naming it.

Where the rule says the compiler enforces it:

src/compiler/ts/integer-literal-deprecation.test.ts (the first step for #148: the warning under the option, no emitted byte moved); review for the timing of the second step.

The files that verify it at commit 26de7be8, each at the first line that names the rule:

See also

Source

The rule at commit 26de7be8:

Edit this page Report a problem