Skip to content

API reference / @jsprismarine/script-host / shape/history

shape/history ​

Interfaces ​

DeclarationShape ​

Defined in: script-host/src/shape/history.ts:6

One declaration as a single version has it.

Properties ​

declaration ​

readonly declaration: ShapeDeclaration

Defined in: script-host/src/shape/history.ts:8

members ​

readonly members: ReadonlyMap<string, ShapeMember>

Defined in: script-host/src/shape/history.ts:9

name ​

readonly name: string

Defined in: script-host/src/shape/history.ts:7


ModuleShape ​

Defined in: script-host/src/shape/history.ts:13

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

Properties ​

declarations ​

readonly declarations: ReadonlyMap<string, DeclarationShape>

Defined in: script-host/src/shape/history.ts:16

module ​

readonly module: string

Defined in: script-host/src/shape/history.ts:14

version ​

readonly version: ModuleVersion

Defined in: script-host/src/shape/history.ts:15

Functions ​

exportNames() ​

exportNames(shape): string[]

Defined in: script-host/src/shape/history.ts:79

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

Parameters ​

shape ​

ModuleShape

Returns ​

string[]


shapeAt() ​

shapeAt(history, version): ModuleShape

Defined in: script-host/src/shape/history.ts:54

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

Parameters ​

history ​

ModuleHistory

version ​

string

Returns ​

ModuleShape

Throws ​

When the history has no such version.