---
title: "Rule 12.2: Diagnostics, a TypeShade design rule"
description: "Rule 12.2 of the TypeShade language design, in Diagnostics. A code must be TS8 followed by a sequential number in the order codes were added…"
url: https://typeshade.dev/reference/rules/12-2/
language: en
---

# Rule 12.2

Chapter 12, Diagnostics Review

A code must be `TS8` followed by a sequential number in the order codes were added, or a number from a block handed to a parallel branch ([Rule 3.7](https://typeshade.dev/reference/rules/3-7/)), whose unused numbers stay a gap. [`TS8099`](https://typeshade.dev/reference/errors/ts8099/) is the catch-all for a site that does not yet deserve its own code, and a refusal that has a reason must leave it.

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

## Rationale

a stable code is what a test, an issue, and a language service filter key on.

## Derives from

`CODE_GAPS` of `src/compiler/ts/code-gaps.ts`; surface §28 (roadmap 0.3 item T10, “in place of `TS8099 Unsupported expression`”).

## How it is verified

Held by review. No file checks it, and the rule names review as what holds it.

Where the rule says the compiler enforces it:

review against [Rule 3.7](https://typeshade.dev/reference/rules/3-7/).

## Explained in

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

- [§28 What TypeScript writes that the GPU has no word for](https://github.com/typeshade/typeshade/blob/af54ddad5/docs/use-typeshade-surface.md#28-what-typescript-writes-that-the-gpu-has-no-word-for)

## See also

- [Rule 12.1](https://typeshade.dev/reference/rules/12-1/) Test
- [Rule 12.3](https://typeshade.dev/reference/rules/12-3/) Test
- [Rule 3.7](https://typeshade.dev/reference/rules/3-7/)
- [Design rules](https://typeshade.dev/reference/rules/)
- [Error codes](https://typeshade.dev/reference/errors/)

## Source

The rule at commit af54ddad5:

- [`docs/language-design.md:1730`](https://github.com/typeshade/typeshade/blob/af54ddad5/docs/language-design.md#L1730) (the design document)
- [`reqs/rules/RULE-1202.md`](https://github.com/typeshade/typeshade/blob/af54ddad5/reqs/rules/RULE-1202.md) (its traceability item)
