---
title: "Rule 1.4: Introduction, a TypeShade design rule"
description: "Rule 1.4 of the TypeShade language design, in Introduction. Where ECMAScript has a form that carries the GPU meaning…"
url: https://typeshade.dev/reference/rules/1-4/
language: en
---

# Rule 1.4

Chapter 1, Introduction Test

Where ECMAScript has a form that carries the GPU meaning, the surface must borrow TypeScript’s spelling; a WGSL spelling is borrowed only where no ECMAScript spelling carries the meaning, and the borrowing must keep every WGSL capability reachable ([Rule 11.14](https://typeshade.dev/reference/rules/11-14/)). A form may be borrowed in part: the members, the positions or the meaning it takes are those the rules give it. A WGSL capability that only switches off a validation the compiler satisfies by rewriting the program is not borrowed: the compiler’s rewrite gives the program the capability would have admitted. The `derivative_uniformity` filter is such a capability ([Rule 8.5](https://typeshade.dev/reference/rules/8-5/)). Its rows in `docs/capability-coverage.md` are `refused` with this rule (Rule 11.14, [Rule 11.18](https://typeshade.dev/reference/rules/11-18/)).

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

## Rationale

the WGSL vocabulary is there to say what TypeScript cannot say, such as a value’s width or an address space. It is not a second spelling an author has to learn for what TypeScript already says. A filter that switches a validation off is not something the author must state: it asks the author to learn a WGSL rule name and its severities for work the compiler can do, and the program it leaves is indeterminate in WGSL and undefined in GLSL ES 3.00. The language keeps a construct only for what the author must state and the compiler cannot know (`docs/owner-decisions.md`, OD-3).

## Derives from

`changes/0100-typescript-meaning.md` (section 1, the first two requirements); the roadmap’s first rule, “ordinary TypeScript first”; `changes/0132-remove-diagnostic.md` (decision 6) and OD-3 for the third sentence.

## 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:

review ([Rule 13.1](https://typeshade.dev/reference/rules/13-1/)); Appendix B, under [Rule 1.1](https://typeshade.dev/reference/rules/1-1/), for the spellings the tree still offers twice; the rows’ cells in `src/core/coverage/wgsl.ts`, checked by `capability-coverage.test.ts` ([Rule 11.18](https://typeshade.dev/reference/rules/11-18/)); [`TS8028`](https://typeshade.dev/reference/errors/ts8028/) on a written `@diagnostic(…)` or `{ diagnostic: [...] }`, and the tests of [Rule 8.5](https://typeshade.dev/reference/rules/8-5/)’s rewrite.

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

- [`src/compiler/ts/diagnostic-removed.test.ts:1`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/diagnostic-removed.test.ts#L1)
- [`src/core/coverage/wgsl.ts:9`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/coverage/wgsl.ts#L9) (checked by the compiler's own test)
- [`src/core/spec-conformance/capability-coverage.test.ts:45`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/spec-conformance/capability-coverage.test.ts#L45) (checked by the compiler's own test)

## Explained in

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

- [§50 `enable`, `requires`, and the built-in values behind an extension](https://github.com/typeshade/typeshade/blob/af54ddad5/docs/use-typeshade-surface.md#50-enable-requires-and-the-built-in-values-behind-an-extension)
- [§54 Derivative uniformity: the control flow a sample may be reached under](https://github.com/typeshade/typeshade/blob/af54ddad5/docs/use-typeshade-surface.md#54-derivative-uniformity-the-control-flow-a-sample-may-be-reached-under)

## Error codes that enforce it

The diagnostic codes the rule names under Enforced by, or whose registry text names the rule:

**[`TS8028`](https://typeshade.dev/reference/errors/ts8028/) `ATTRIBUTE_NAME`**

A decorator or an entry form that this surface does not read: an identifier outside the attribute vocabulary (`@vertex`, `@fragment`, `@compute`, `@builtin`, `@location`), such as a misspelled `@vertx`; a WGSL attribute that the surface writes another way or does not borrow, such as a written `@diagnostic(…)`; a stage written as a call, such as `vertex(f)`; an entry that is written in a form that [Rule 8.1](https://typeshade.dev/reference/rules/8-1/) refuses, such as `export default`; or a decorator on a declaration or in a place that takes none ([Rule 6.7](https://typeshade.dev/reference/rules/6-7/)). Without this code the decorated function or field would silently stop being an entry point or an I/O field.

## See also

- [Rule 1.3](https://typeshade.dev/reference/rules/1-3/) Test
- [Rule 1.5](https://typeshade.dev/reference/rules/1-5/) Review
- [Rule 1.1](https://typeshade.dev/reference/rules/1-1/)
- [Rule 8.5](https://typeshade.dev/reference/rules/8-5/)
- [Rule 11.14](https://typeshade.dev/reference/rules/11-14/)
- [Rule 11.18](https://typeshade.dev/reference/rules/11-18/)
- [Rule 13.1](https://typeshade.dev/reference/rules/13-1/)
- [Design rules](https://typeshade.dev/reference/rules/)
- [Error codes](https://typeshade.dev/reference/errors/)

## Source

The rule at commit af54ddad5:

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