[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/script-host](https://jsprismarine.dev/api/@jsprismarine/script-host/index.md) / shape/format

# shape/format

## Interfaces

### ArrayType

Defined in: [script-host/src/shape/format.ts:73](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L73)

An array of one element type.

#### Properties

##### element

> `readonly` **element**: [`ShapeType`](#shapetype)

Defined in: [script-host/src/shape/format.ts:75](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L75)

##### kind

> `readonly` **kind**: `"array"`

Defined in: [script-host/src/shape/format.ts:74](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L74)

***

### ClassDeclaration

Defined in: [script-host/src/shape/format.ts:209](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L209)

A class. Its `base` is another class it extends.

#### Properties

##### base?

> `readonly` `optional` **base?**: `string` \| [`ExternalType`](#externaltype)

Defined in: [script-host/src/shape/format.ts:211](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L211)

##### conditions?

> `readonly` `optional` **conditions?**: readonly `string`[]

Defined in: [script-host/src/shape/format.ts:215](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L215)

`runtime_conditions`: names of the conditions the class needs, such as `Poi` in a beta.

##### iterator?

> `readonly` `optional` **iterator?**: `object`

Defined in: [script-host/src/shape/format.ts:213](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L213)

What the class's iterator yields, for a class a script can iterate.

###### throws?

> `readonly` `optional` **throws?**: readonly [`ErrorReference`](#errorreference)[]

###### type

> `readonly` **type**: [`ShapeType`](#shapetype)

##### kind

> `readonly` **kind**: `"class"`

Defined in: [script-host/src/shape/format.ts:210](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L210)

***

### ClosureType

Defined in: [script-host/src/shape/format.ts:86](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L86)

A function a script passes in, and the privilege it runs under when one is recorded.

#### Properties

##### arguments

> `readonly` **arguments**: readonly [`ShapeType`](#shapetype)[]

Defined in: [script-host/src/shape/format.ts:88](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L88)

##### kind

> `readonly` **kind**: `"closure"`

Defined in: [script-host/src/shape/format.ts:87](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L87)

##### privilege?

> `readonly` `optional` **privilege?**: readonly [`Privilege`](#privilege-4)[]

Defined in: [script-host/src/shape/format.ts:90](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L90)

##### returns

> `readonly` **returns**: [`ShapeType`](#shapetype)

Defined in: [script-host/src/shape/format.ts:89](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L89)

***

### ConstantDeclaration

Defined in: [script-host/src/shape/format.ts:241](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L241)

A module-level constant, such as `TicksPerSecond`.

#### Properties

##### kind

> `readonly` **kind**: `"constant"`

Defined in: [script-host/src/shape/format.ts:242](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L242)

##### type

> `readonly` **type**: [`ShapeType`](#shapetype)

Defined in: [script-host/src/shape/format.ts:243](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L243)

##### value

> `readonly` **value**: `string` \| `number` \| `boolean`

Defined in: [script-host/src/shape/format.ts:244](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L244)

***

### DeclarationHistory

Defined in: [script-host/src/shape/format.ts:273](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L273)

A declaration's history, and each member's.

#### Properties

##### members?

> `readonly` `optional` **members?**: `Readonly`\<`Record`\<`string`, readonly [`Segment`](#segment)\<[`ShapeMember`](#shapemember)\>[]\>\>

Defined in: [script-host/src/shape/format.ts:275](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L275)

##### segments

> `readonly` **segments**: readonly [`Segment`](#segment)\<[`ShapeDeclaration`](#shapedeclaration)\>[]

Defined in: [script-host/src/shape/format.ts:274](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L274)

***

### EnumDeclaration

Defined in: [script-host/src/shape/format.ts:225](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L225)

An enum: an object of constants.

#### Properties

##### kind

> `readonly` **kind**: `"enum"`

Defined in: [script-host/src/shape/format.ts:226](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L226)

***

### ErrorDeclaration

Defined in: [script-host/src/shape/format.ts:230](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L230)

An error class. Its members are its properties.

#### Properties

##### kind

> `readonly` **kind**: `"error"`

Defined in: [script-host/src/shape/format.ts:231](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L231)

***

### ExternalType

Defined in: [script-host/src/shape/format.ts:46](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L46)

A class, interface, enum or error of another module, such as `@minecraft/common`'s `EngineError`.

#### Properties

##### kind

> `readonly` **kind**: `"external"`

Defined in: [script-host/src/shape/format.ts:47](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L47)

##### module

> `readonly` **module**: `string`

Defined in: [script-host/src/shape/format.ts:48](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L48)

##### name

> `readonly` **name**: `string`

Defined in: [script-host/src/shape/format.ts:49](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L49)

***

### FunctionDeclaration

Defined in: [script-host/src/shape/format.ts:248](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L248)

A module-level function.

#### Extends

- `ShapeCallable`

#### Properties

##### arguments

> `readonly` **arguments**: readonly [`ShapeArgument`](#shapeargument)[]

Defined in: [script-host/src/shape/format.ts:159](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L159)

###### Inherited from

`ShapeCallable.arguments`

##### kind

> `readonly` **kind**: `"function"`

Defined in: [script-host/src/shape/format.ts:249](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L249)

##### override?

> `readonly` `optional` **override?**: `string`

Defined in: [script-host/src/shape/format.ts:164](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L164)

The id of the override in `scripts/shape/overrides.mts` that changed this entry.

###### Inherited from

`ShapeCallable.override`

##### privilege

> `readonly` **privilege**: readonly [`Privilege`](#privilege-4)[]

Defined in: [script-host/src/shape/format.ts:158](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L158)

###### Inherited from

`ShapeCallable.privilege`

##### returns

> `readonly` **returns**: [`ShapeType`](#shapetype)

Defined in: [script-host/src/shape/format.ts:250](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L250)

##### script?

> `readonly` `optional` **script?**: `string`

Defined in: [script-host/src/shape/format.ts:162](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L162)

`raw_script_text`: the TypeScript signature of a member the metadata cannot describe otherwise.

###### Inherited from

`ShapeCallable.script`

##### throws?

> `readonly` `optional` **throws?**: readonly [`ErrorReference`](#errorreference)[]

Defined in: [script-host/src/shape/format.ts:160](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L160)

###### Inherited from

`ShapeCallable.throws`

***

### GeneratorType

Defined in: [script-host/src/shape/format.ts:100](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L100)

A generator, as `system.runJob` takes one.

#### Properties

##### kind

> `readonly` **kind**: `"generator"`

Defined in: [script-host/src/shape/format.ts:101](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L101)

##### next

> `readonly` **next**: [`ShapeType`](#shapetype)

Defined in: [script-host/src/shape/format.ts:103](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L103)

##### returns

> `readonly` **returns**: [`ShapeType`](#shapetype)

Defined in: [script-host/src/shape/format.ts:104](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L104)

##### yield

> `readonly` **yield**: [`ShapeType`](#shapetype)

Defined in: [script-host/src/shape/format.ts:102](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L102)

***

### InterfaceDeclaration

Defined in: [script-host/src/shape/format.ts:219](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L219)

An interface: a plain object shape with no value at run time.

#### Properties

##### base?

> `readonly` `optional` **base?**: `string` \| [`ExternalType`](#externaltype)

Defined in: [script-host/src/shape/format.ts:221](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L221)

##### kind

> `readonly` **kind**: `"interface"`

Defined in: [script-host/src/shape/format.ts:220](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L220)

***

### MapType

Defined in: [script-host/src/shape/format.ts:79](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L79)

A plain object used as a map.

#### Properties

##### key

> `readonly` **key**: [`ShapeType`](#shapetype)

Defined in: [script-host/src/shape/format.ts:81](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L81)

##### kind

> `readonly` **kind**: `"map"`

Defined in: [script-host/src/shape/format.ts:80](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L80)

##### value

> `readonly` **value**: [`ShapeType`](#shapetype)

Defined in: [script-host/src/shape/format.ts:82](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L82)

***

### ModuleHistory

Defined in: [script-host/src/shape/format.ts:294](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L294)

The generated history of one module, the content of one file in `src/generated/`.

#### Properties

##### declarations

> `readonly` **declarations**: `Readonly`\<`Record`\<`string`, [`DeclarationHistory`](#declarationhistory)\>\>

Defined in: [script-host/src/shape/format.ts:304](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L304)

##### module

> `readonly` **module**: `string`

Defined in: [script-host/src/shape/format.ts:295](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L295)

##### resolves

> `readonly` **resolves**: `Readonly`\<`Record`\<`string`, `string`\>\>

Defined in: [script-host/src/shape/format.ts:303](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L303)

The version BDS serves for each major version: the newest stable minor of that major, so a
pack declaring 2.0.0 gets 2.10.0.

##### uuid

> `readonly` **uuid**: `string`

Defined in: [script-host/src/shape/format.ts:296](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L296)

##### versions

> `readonly` **versions**: readonly [`ModuleVersion`](#moduleversion)[]

Defined in: [script-host/src/shape/format.ts:298](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L298)

Every version the file covers, oldest first. Segments refer to these.

***

### ModuleVersion

Defined in: [script-host/src/shape/format.ts:282](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L282)

One published version of a module.

#### Properties

##### bindings?

> `readonly` `optional` **bindings?**: `string`

Defined in: [script-host/src/shape/format.ts:286](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L286)

The module the stub names as its `parentModule`, which holds the API.

##### dependencies

> `readonly` **dependencies**: `Readonly`\<`Record`\<`string`, `string`\>\>

Defined in: [script-host/src/shape/format.ts:290](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L290)

The version of each module this one depends on, from `peer_dependencies` without `types_only`.

##### stability

> `readonly` **stability**: [`VersionStability`](#versionstability)

Defined in: [script-host/src/shape/format.ts:284](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L284)

##### version

> `readonly` **version**: `string`

Defined in: [script-host/src/shape/format.ts:283](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L283)

##### wrapper?

> `readonly` `optional` **wrapper?**: `string`

Defined in: [script-host/src/shape/format.ts:288](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L288)

The stub's `wrapper_module`.

***

### ObjectDeclaration

Defined in: [script-host/src/shape/format.ts:235](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L235)

A module-level object, such as `world`, of a class in the module.

#### Properties

##### kind

> `readonly` **kind**: `"object"`

Defined in: [script-host/src/shape/format.ts:236](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L236)

##### type

> `readonly` **type**: [`ShapeType`](#shapetype)

Defined in: [script-host/src/shape/format.ts:237](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L237)

***

### OptionalType

Defined in: [script-host/src/shape/format.ts:61](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L61)

A value that may be `undefined`.

#### Properties

##### kind

> `readonly` **kind**: `"optional"`

Defined in: [script-host/src/shape/format.ts:62](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L62)

##### type

> `readonly` **type**: [`ShapeType`](#shapetype)

Defined in: [script-host/src/shape/format.ts:63](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L63)

***

### PromiseType

Defined in: [script-host/src/shape/format.ts:94](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L94)

A promise.

#### Properties

##### kind

> `readonly` **kind**: `"promise"`

Defined in: [script-host/src/shape/format.ts:95](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L95)

##### type

> `readonly` **type**: [`ShapeType`](#shapetype)

Defined in: [script-host/src/shape/format.ts:96](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L96)

***

### RangedNumberType

Defined in: [script-host/src/shape/format.ts:53](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L53)

A number with a `valid_range` other than [DEFAULT\_VALID\_RANGE](#default-valid-range).

#### Properties

##### kind

> `readonly` **kind**: `"number"`

Defined in: [script-host/src/shape/format.ts:54](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L54)

##### max

> `readonly` **max**: `number`

Defined in: [script-host/src/shape/format.ts:57](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L57)

##### min

> `readonly` **min**: `number`

Defined in: [script-host/src/shape/format.ts:56](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L56)

##### type

> `readonly` **type**: `"int32"` \| `"int8"` \| `"uint8"` \| `"int16"` \| `"uint16"` \| `"uint32"` \| `"int64"` \| `"uint64"` \| `"float"` \| `"double"`

Defined in: [script-host/src/shape/format.ts:55](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L55)

***

### ScriptTextType

Defined in: [script-host/src/shape/format.ts:111](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L111)

A TypeScript type the metadata spells out as text, such as `BlockComponentReturnType<T>` in a
member with `raw_script_text`. Nothing validates it.

#### Properties

##### kind

> `readonly` **kind**: `"script"`

Defined in: [script-host/src/shape/format.ts:112](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L112)

##### text

> `readonly` **text**: `string`

Defined in: [script-host/src/shape/format.ts:113](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L113)

***

### SegmentRange

Defined in: [script-host/src/shape/format.ts:264](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L264)

The versions a segment covers, by version string: `from` to `to`, or to the newest when `to` is absent.

#### Properties

##### from

> `readonly` **from**: `string`

Defined in: [script-host/src/shape/format.ts:265](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L265)

##### to?

> `readonly` `optional` **to?**: `string`

Defined in: [script-host/src/shape/format.ts:266](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L266)

***

### ShapeArgument

Defined in: [script-host/src/shape/format.ts:140](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L140)

One argument of a method, a constructor or a module function.

#### Properties

##### default?

> `readonly` `optional` **default?**: `string` \| `number` \| `boolean` \| `null`

Defined in: [script-host/src/shape/format.ts:147](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L147)

`details.default_value`. Present means the argument may be left out. The metadata writes the
string `"null"` for an argument with no default value, which the generator writes as `null`.

##### max?

> `readonly` `optional` **max?**: `number`

Defined in: [script-host/src/shape/format.ts:151](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L151)

`details.max_value`.

##### maxLength?

> `readonly` `optional` **maxLength?**: `number`

Defined in: [script-host/src/shape/format.ts:153](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L153)

`details.max_length`, for a string.

##### min?

> `readonly` `optional` **min?**: `number`

Defined in: [script-host/src/shape/format.ts:149](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L149)

`details.min_value`.

##### name

> `readonly` **name**: `string`

Defined in: [script-host/src/shape/format.ts:141](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L141)

##### type

> `readonly` **type**: [`ShapeType`](#shapetype)

Defined in: [script-host/src/shape/format.ts:142](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L142)

***

### ShapeConstant

Defined in: [script-host/src/shape/format.ts:198](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L198)

A constant of a class or an enum.

#### Properties

##### kind

> `readonly` **kind**: `"constant"`

Defined in: [script-host/src/shape/format.ts:199](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L199)

##### static?

> `readonly` `optional` **static?**: `true`

Defined in: [script-host/src/shape/format.ts:200](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L200)

##### type

> `readonly` **type**: [`ShapeType`](#shapetype)

Defined in: [script-host/src/shape/format.ts:201](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L201)

##### value

> `readonly` **value**: `string` \| `number` \| `boolean`

Defined in: [script-host/src/shape/format.ts:202](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L202)

***

### ShapeConstructor

Defined in: [script-host/src/shape/format.ts:175](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L175)

A class's constructor. A class without one cannot be constructed by a script.

#### Extends

- `ShapeCallable`

#### Properties

##### arguments

> `readonly` **arguments**: readonly [`ShapeArgument`](#shapeargument)[]

Defined in: [script-host/src/shape/format.ts:159](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L159)

###### Inherited from

`ShapeCallable.arguments`

##### kind

> `readonly` **kind**: `"constructor"`

Defined in: [script-host/src/shape/format.ts:176](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L176)

##### override?

> `readonly` `optional` **override?**: `string`

Defined in: [script-host/src/shape/format.ts:164](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L164)

The id of the override in `scripts/shape/overrides.mts` that changed this entry.

###### Inherited from

`ShapeCallable.override`

##### privilege

> `readonly` **privilege**: readonly [`Privilege`](#privilege-4)[]

Defined in: [script-host/src/shape/format.ts:158](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L158)

###### Inherited from

`ShapeCallable.privilege`

##### script?

> `readonly` `optional` **script?**: `string`

Defined in: [script-host/src/shape/format.ts:162](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L162)

`raw_script_text`: the TypeScript signature of a member the metadata cannot describe otherwise.

###### Inherited from

`ShapeCallable.script`

##### throws?

> `readonly` `optional` **throws?**: readonly [`ErrorReference`](#errorreference)[]

Defined in: [script-host/src/shape/format.ts:160](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L160)

###### Inherited from

`ShapeCallable.throws`

***

### ShapeMethod

Defined in: [script-host/src/shape/format.ts:168](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L168)

A method of a class, or a static one.

#### Extends

- `ShapeCallable`

#### Properties

##### arguments

> `readonly` **arguments**: readonly [`ShapeArgument`](#shapeargument)[]

Defined in: [script-host/src/shape/format.ts:159](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L159)

###### Inherited from

`ShapeCallable.arguments`

##### kind

> `readonly` **kind**: `"method"`

Defined in: [script-host/src/shape/format.ts:169](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L169)

##### override?

> `readonly` `optional` **override?**: `string`

Defined in: [script-host/src/shape/format.ts:164](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L164)

The id of the override in `scripts/shape/overrides.mts` that changed this entry.

###### Inherited from

`ShapeCallable.override`

##### privilege

> `readonly` **privilege**: readonly [`Privilege`](#privilege-4)[]

Defined in: [script-host/src/shape/format.ts:158](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L158)

###### Inherited from

`ShapeCallable.privilege`

##### returns

> `readonly` **returns**: [`ShapeType`](#shapetype)

Defined in: [script-host/src/shape/format.ts:171](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L171)

##### script?

> `readonly` `optional` **script?**: `string`

Defined in: [script-host/src/shape/format.ts:162](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L162)

`raw_script_text`: the TypeScript signature of a member the metadata cannot describe otherwise.

###### Inherited from

`ShapeCallable.script`

##### static?

> `readonly` `optional` **static?**: `true`

Defined in: [script-host/src/shape/format.ts:170](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L170)

##### throws?

> `readonly` `optional` **throws?**: readonly [`ErrorReference`](#errorreference)[]

Defined in: [script-host/src/shape/format.ts:160](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L160)

###### Inherited from

`ShapeCallable.throws`

***

### ShapeProperty

Defined in: [script-host/src/shape/format.ts:180](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L180)

A property of a class, error or interface.

#### Properties

##### baked?

> `readonly` `optional` **baked?**: `true`

Defined in: [script-host/src/shape/format.ts:186](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L186)

`is_baked`, which the metadata does not define.

##### get?

> `readonly` `optional` **get?**: readonly [`Privilege`](#privilege-4)[]

Defined in: [script-host/src/shape/format.ts:187](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L187)

##### kind

> `readonly` **kind**: `"property"`

Defined in: [script-host/src/shape/format.ts:181](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L181)

##### max?

> `readonly` `optional` **max?**: `number`

Defined in: [script-host/src/shape/format.ts:192](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L192)

`max_value`: the largest number the setter accepts.

##### min?

> `readonly` `optional` **min?**: `number`

Defined in: [script-host/src/shape/format.ts:190](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L190)

`min_value`: the smallest number the setter accepts.

##### override?

> `readonly` `optional` **override?**: `string`

Defined in: [script-host/src/shape/format.ts:194](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L194)

##### readOnly

> `readonly` **readOnly**: `boolean`

Defined in: [script-host/src/shape/format.ts:184](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L184)

##### set?

> `readonly` `optional` **set?**: readonly [`Privilege`](#privilege-4)[]

Defined in: [script-host/src/shape/format.ts:188](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L188)

##### static?

> `readonly` `optional` **static?**: `true`

Defined in: [script-host/src/shape/format.ts:182](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L182)

##### throws?

> `readonly` `optional` **throws?**: readonly [`ErrorReference`](#errorreference)[]

Defined in: [script-host/src/shape/format.ts:193](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L193)

##### type

> `readonly` **type**: [`ShapeType`](#shapetype)

Defined in: [script-host/src/shape/format.ts:183](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L183)

***

### VariantType

Defined in: [script-host/src/shape/format.ts:67](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L67)

A value of any one of several types.

#### Properties

##### kind

> `readonly` **kind**: `"variant"`

Defined in: [script-host/src/shape/format.ts:68](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L68)

##### types

> `readonly` **types**: readonly [`ShapeType`](#shapetype)[]

Defined in: [script-host/src/shape/format.ts:69](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L69)

## Type Aliases

### ErrorReference

> **ErrorReference** = `string` \| [`ExternalType`](#externaltype)

Defined in: [script-host/src/shape/format.ts:137](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L137)

An error class a member may throw: a name in the same module, a type from another one, or
`Error`, JavaScript's own.

***

### NumberType

> **NumberType** = *typeof* [`NUMBER_TYPES`](#number-types)\[`number`\]

Defined in: [script-host/src/shape/format.ts:29](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L29)

One of [NUMBER\_TYPES](#number-types).

***

### PrimitiveType

> **PrimitiveType** = [`NumberType`](#numbertype) \| *typeof* [`OTHER_PRIMITIVE_TYPES`](#other-primitive-types)\[`number`\]

Defined in: [script-host/src/shape/format.ts:35](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L35)

A type the metadata names without a declaration behind it.

***

### Privilege

> **Privilege** = `"default"` \| `"restricted_execution"` \| `"early_execution"`

Defined in: [script-host/src/shape/format.ts:12](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L12)

An execution privilege as the metadata names it.

***

### Segment

> **Segment**\<`Value`\> = [`SegmentRange`](#segmentrange) & `Value`

Defined in: [script-host/src/shape/format.ts:270](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L270)

One stretch of versions over which a value stays the same.

#### Type Parameters

##### Value

`Value`

***

### ShapeDeclaration

> **ShapeDeclaration** = [`ClassDeclaration`](#classdeclaration) \| [`InterfaceDeclaration`](#interfacedeclaration) \| [`EnumDeclaration`](#enumdeclaration) \| [`ErrorDeclaration`](#errordeclaration) \| [`ObjectDeclaration`](#objectdeclaration) \| [`ConstantDeclaration`](#constantdeclaration) \| [`FunctionDeclaration`](#functiondeclaration)

Defined in: [script-host/src/shape/format.ts:254](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L254)

A name a module declares. Interfaces are the only ones with no value at run time.

***

### ShapeMember

> **ShapeMember** = [`ShapeMethod`](#shapemethod) \| [`ShapeConstructor`](#shapeconstructor) \| [`ShapeProperty`](#shapeproperty) \| [`ShapeConstant`](#shapeconstant)

Defined in: [script-host/src/shape/format.ts:206](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L206)

Anything a declaration holds by name.

***

### ShapeType

> **ShapeType** = `string` \| [`ExternalType`](#externaltype) \| [`RangedNumberType`](#rangednumbertype) \| [`OptionalType`](#optionaltype) \| [`VariantType`](#varianttype) \| [`ArrayType`](#arraytype) \| [`MapType`](#maptype) \| [`ClosureType`](#closuretype) \| [`PromiseType`](#promisetype) \| [`GeneratorType`](#generatortype) \| [`ScriptTextType`](#scripttexttype)

Defined in: [script-host/src/shape/format.ts:120](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L120)

A type in the shape. A string is a [PrimitiveType](#primitivetype) or the name of a class, interface or
enum in the same module; [isPrimitiveType](#isprimitivetype) tells them apart.

***

### VersionStability

> **VersionStability** = `"stable"` \| `"beta"`

Defined in: [script-host/src/shape/format.ts:279](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L279)

Whether a version is a stable release or a prerelease such as `2.11.0-beta`.

## Variables

### DEFAULT\_VALID\_RANGE

> `const` **DEFAULT\_VALID\_RANGE**: `object`

Defined in: [script-host/src/shape/format.ts:43](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L43)

The `valid_range` every numeric type in the pinned metadata carries, whatever its type: the
int32 range. It says nothing about the type, and BDS does not enforce it on a `double`
(section 3 of `docs/research/bedrock-script-api.md`), so the generator writes a range only when
it differs from this one.

#### Type Declaration

##### max

> `readonly` **max**: `2147483647` = `2147483647`

##### min

> `readonly` **min**: `-2147483648` = `-2147483648`

***

### NUMBER\_TYPES

> `const` **NUMBER\_TYPES**: readonly \[`"int8"`, `"uint8"`, `"int16"`, `"uint16"`, `"int32"`, `"uint32"`, `"int64"`, `"uint64"`, `"float"`, `"double"`\]

Defined in: [script-host/src/shape/format.ts:15](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L15)

The numeric types the metadata uses. Every one crosses into a script as a JavaScript number.

***

### OTHER\_PRIMITIVE\_TYPES

> `const` **OTHER\_PRIMITIVE\_TYPES**: readonly \[`"boolean"`, `"string"`, `"undefined"`, `"void"`, `"any"`, `"unknown"`, `"error"`\]

Defined in: [script-host/src/shape/format.ts:32](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L32)

The non-numeric type names that are not a class, interface or enum of the API.

## Functions

### isNumberType()

> **isNumberType**(`name`): name is "int32" \| "int8" \| "uint8" \| "int16" \| "uint16" \| "uint32" \| "int64" \| "uint64" \| "float" \| "double"

Defined in: [script-host/src/shape/format.ts:314](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L314)

Whether a type name is one of the [NUMBER\_TYPES](#number-types).

#### Parameters

##### name

`string`

#### Returns

name is "int32" \| "int8" \| "uint8" \| "int16" \| "uint16" \| "uint32" \| "int64" \| "uint64" \| "float" \| "double"

***

### isPrimitiveType()

> **isPrimitiveType**(`name`): `name is PrimitiveType`

Defined in: [script-host/src/shape/format.ts:311](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/format.ts#L311)

Whether a type name is a [PrimitiveType](#primitivetype) rather than a declaration of the module.

#### Parameters

##### name

`string`

#### Returns

`name is PrimitiveType`
