Rule 4.5
On this page

Rule 4.5

Chapter 4, Types Test

A TypeScript type the compiler cannot represent on a target must be refused in one sentence naming the reason and what to write instead; the list is surface §28 and is not repeated here.

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

Rationale

the constraint is the target’s, and the sentence has to say so at the line the author wrote. The test is what the compiler can represent (Rule 1.5), not whether WGSL has a word for the type.

Derives from

changes/0100-typescript-meaning.md (section 2); surface §28 (roadmap 0.3 item T10); Plain Types for what a value type is.

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/honest-refusals.test.ts.

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

Explained in

The sections of the surface document that explain this rule, at commit af54ddad5:

See also

Source

The rule at commit af54ddad5:

Edit this page Report a problem