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

# shape/history

## Interfaces

### DeclarationShape

Defined in: [script-host/src/shape/history.ts:6](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/history.ts#L6)

One declaration as a single version has it.

#### Properties

##### declaration

> `readonly` **declaration**: [`ShapeDeclaration`](https://jsprismarine.dev/api/@jsprismarine/script-host/shape/format/index.md#shapedeclaration)

Defined in: [script-host/src/shape/history.ts:8](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/history.ts#L8)

##### members

> `readonly` **members**: `ReadonlyMap`\<`string`, [`ShapeMember`](https://jsprismarine.dev/api/@jsprismarine/script-host/shape/format/index.md#shapemember)\>

Defined in: [script-host/src/shape/history.ts:9](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/history.ts#L9)

##### name

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

Defined in: [script-host/src/shape/history.ts:7](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/history.ts#L7)

***

### ModuleShape

Defined in: [script-host/src/shape/history.ts:13](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/history.ts#L13)

The API one version of one module serves: its declarations by name, in the history's order.

#### Properties

##### declarations

> `readonly` **declarations**: `ReadonlyMap`\<`string`, [`DeclarationShape`](#declarationshape)\>

Defined in: [script-host/src/shape/history.ts:16](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/history.ts#L16)

##### module

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

Defined in: [script-host/src/shape/history.ts:14](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/shape/history.ts#L14)

##### version

> `readonly` **version**: [`ModuleVersion`](https://jsprismarine.dev/api/@jsprismarine/script-host/shape/format/index.md#moduleversion)

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

## Functions

### exportNames()

> **exportNames**(`shape`): `string`[]

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

The names a script's `import * as module` sees: every declaration but the interfaces, which
have no value at run time.

#### Parameters

##### shape

[`ModuleShape`](#moduleshape)

#### Returns

`string`[]

***

### shapeAt()

> **shapeAt**(`history`, `version`): [`ModuleShape`](#moduleshape)

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

Builds the API one version of a module serves from the module's history.

#### Parameters

##### history

[`ModuleHistory`](https://jsprismarine.dev/api/@jsprismarine/script-host/shape/format/index.md#modulehistory)

##### version

`string`

#### Returns

[`ModuleShape`](#moduleshape)

#### Throws

When the history has no such version.
