---
title: "Rule 4.5, Types: a TypeShade language design rule"
description: "Rule 4.5 of the TypeShade language design, in Types. A TypeScript type the compiler cannot represent on a target must be refused in one sentence naming the…"
url: https://typeshade.dev/reference/rules/4-5/
language: en
---

# 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](https://typeshade.dev/reference/rules/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](https://gpuweb.github.io/gpuweb/wgsl/#plain-types-section) 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:

- [`src/compiler/ts/honest-refusals-tuples.test.ts:1`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/honest-refusals-tuples.test.ts#L1)
- [`src/compiler/ts/honest-refusals.test.ts:1`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/honest-refusals.test.ts#L1)

## 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 4.4](https://typeshade.dev/reference/rules/4-4/) Test
- [Rule 4.6](https://typeshade.dev/reference/rules/4-6/) Test
- [Rule 1.5](https://typeshade.dev/reference/rules/1-5/)
- [Design rules](https://typeshade.dev/reference/rules/)
- [Error codes](https://typeshade.dev/reference/errors/)

## Source

The rule at commit af54ddad5:

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