examples#

Interfaces#

Example#

Defined in: editor/src/examples.ts:16

An entry of the Examples menu (or of the fixture menu).

Properties#

kind#

readonly kind: ExampleKind

Defined in: editor/src/examples.ts:19

label#

readonly label: string

Defined in: editor/src/examples.ts:18

The menu’s label.

source?#

readonly optional source?: ManifestSource

Defined in: editor/src/examples.ts:23

Where a manifest’s files are read from: those served beside it; absent where none are.

text#

readonly text: () => Promise<string>

Defined in: editor/src/examples.ts:21

The file’s text, fetched on first use.

Returns#

Promise<string>

Type Aliases#

ExampleKind#

ExampleKind = "manifest" | "workspace"

Defined in: editor/src/examples.ts:13

How an example is read: a manifest imported as a block, or a workspace opened.

Variables#

EXAMPLES#

const EXAMPLES: readonly Example[]

Defined in: editor/src/examples.ts:69

The Examples menu’s entries, in menu order.

Functions#

examples()#

examples(fixtures, workspaces): Example[]

Defined in: editor/src/examples.ts:53

The examples in menu order: the manifests, each read from the fixture of SCHEMA_VERSION among fixtures, then the workspaces among workspaces.

Parameters#

fixtures#

Files

workspaces#

Files

Returns#

Example[]