manifest/io#

Interfaces#

ReadManifestFile#

Defined in: manifest/io.ts:567

A manifest read from a file, and how the file writes it.

Properties#

file#

readonly file: FileForm

Defined in: manifest/io.ts:569

manifest#

readonly manifest: Manifest

Defined in: manifest/io.ts:568

Type Aliases#

Styling#

Styling = Omit<Graphical, "timestamps" | "matchstamps" | "elisions">

Defined in: manifest/io.ts:325

A graphical block without its named timestamps, MatchStamps and elisions, which hold no declaration.

Variables#

NEW_MANIFEST_FILE#

const NEW_MANIFEST_FILE: FileForm

Defined in: manifest/io.ts:532

How a manifest not read from a file is written: minimal, with its styling, in canonical YAML.

Functions#

completed()#

completed(value): Manifest | LoadError

Defined in: manifest/io.ts:382

The complete form of a value the schema accepts, the step of normalizeManifest after the schema check, for a value already checked (schemaChecked): its @context cut to the prefixes it declares itself and uses (withStatementContext), completed and in canonical order, its segments unlocked (a segment’s own lock has no meaning: its segment line’s governs it), every other lock as the value states it, its graphical block’s declarations made plain (plainGraphical); or every invariant problem of it.

Parameters#

value#

{ }

Returns#

Manifest | LoadError


completeOrdered()#

completeOrdered<T>(value): Problem | T

Defined in: manifest/io.ts:449

value in its complete form and canonical order, as a command’s change is checked; a value that cannot be ordered (an entry whose ordering member is missing or of the wrong type) is refused with the schema’s problem of its complete form.

Type Parameters#

T#

T

Parameters#

value#

T

Returns#

Problem | T


idFormPath()#

idFormPath(path, toFile): PathSegment[]

Defined in: manifest/io.ts:104

A path into a manifest written with bare IDs as the same path into its file form (toFile), or back: the one segment that is an ID, a key of graphical.order, gains its #, or loses it where it has one. Every other segment is a key or an index, the same in both forms.

Parameters#

path#

readonly PathSegment[]

toFile#

boolean

Returns#

PathSegment[]


loadManifest()#

loadManifest(text): Manifest | LoadError

Defined in: manifest/io.ts:559

A manifest from the text of a manifest file in any serialization, its IDs written #id: the schema checks the value as the file writes it, then every ID is made bare (withBareIds) and the manifest read as normalizeManifest reads one. A problem’s path leads into the file.

Parameters#

text#

string

Returns#

Manifest | LoadError


manifestFileValue()#

manifestFileValue<T>(value): T

Defined in: manifest/io.ts:121

A value TiLiE holds, its IDs bare, as a file writes it: every ID #id (withFileIds) and the full context (withFullContext). The one file boundary: saveManifest writes this value, the schema checks, the warnings and the unknown keys read it, and a host showing a manifest as its file shows it (before leaving the styling out or writing the minimal form, as the file says).

Type Parameters#

T#

T

Parameters#

value#

T

Returns#

T


manifestProblems()#

manifestProblems(value): Problem[]

Defined in: manifest/io.ts:405

The schema problem of a manifest value, else every invariant problem of its complete form; empty for a value normalizeManifest accepts.

Parameters#

value#

unknown

Returns#

Problem[]


manifestWarnings()#

manifestWarnings(manifest): ManifestWarning[]

Defined in: manifest/io.ts:211

The warnings of a manifest TiLiE holds, its IDs bare (TimeToShare’s manifestWarnings of its file form with the full context a file writes, manifestFileValue: a manifest with statements but no ID), each path into the manifest itself.

Parameters#

manifest#

unknown

Returns#

ManifestWarning[]

Throws#

for a manifest the schema refuses.


normalizeManifest()#

normalizeManifest(value): Manifest | LoadError

Defined in: manifest/io.ts:424

A manifest from a value with bare IDs, the one way such a value becomes a Manifest: its @context cut to the prefixes it declares itself and uses (withStatementContext), as every value a command gives or leaves is, the schema validates it (schemaChecked), then it is put in its complete form (every default written out, whether it was complete or minimal or anything between), in canonical order, its segments unlocked, its invariants checked, its graphical declarations’ numbers made doubles, and its missing styles completed. Every schema or invariant problem refuses it, and so does a declaration’s integer that no double holds. Unknown keys are kept.

Parameters#

value#

unknown

Returns#

Manifest | LoadError


plainDeclaration()#

plainDeclaration(declaration, path): Problem | Declaration

Defined in: manifest/io.ts:249

A declaration with its numbers as doubles (declarationNumber), its other members, unknown keys included, kept, every key where it was. The members that may be numbers are listed here, with their words (max-width’s none, elision-proportion’s auto); a numeric member the schema adds fails to compile in rest.

Parameters#

declaration#

{ }

path#

readonly PathSegment[]

Returns#

Problem | Declaration


plainGraphical()#

plainGraphical(graphical): Problem | Styling

Defined in: manifest/io.ts:335

The styling of a graphical block read losslessly, its declarations as the drawing reads them: every declaration’s numbers doubles (plainDeclaration), in the named styles and in the rules; the orders kept as they are, and every key of every object where it was. The named timestamps and the elisions, whose coordinates are own-axis values, and the named MatchStamps are left to the caller.

Parameters#

graphical#

{ }

Returns#

Problem | Styling


plainSelector()#

plainSelector(select): Selector

Defined in: manifest/io.ts:305

A selector read losslessly as the plain Selector: it holds no number, only its non-empty addresses and each address’s non-empty part, which the lossless type reads as lists, are given their tuples again, in their places.

Parameters#

select#

{ }

Returns#

Selector


readEntry()#

readEntry<K>(kind, value, at, index, manifest): Problem | EntryTypes[K]

Defined in: manifest/io.ts:486

A map, region or flow-control element given to a command, read through the schema boundary where it will lie: in the timeline at locates in manifest, at index of its kind’s list (the entry there replaced, or appended at the list’s length), the whole manifest read with the value in place (readInPlace), and the value returned in its complete form. A schema problem is returned with its path from the timeline, or at the entry’s place in it where the problem lies elsewhere; the caller places it in its manifest.

Type Parameters#

K#

K extends keyof EntryTypes

Parameters#

kind#

K

value#

JsonObject

at#

Located

index#

number

manifest#

Manifest

Returns#

Problem | EntryTypes[K]


readInPlace()#

readInPlace(probe): Problem | CompleteManifest

Defined in: manifest/io.ts:469

A value given to a command, read where it will lie: probe, the manifest with the value in place, its @context as core holds it (withStatementContext), completed, ordered and checked whole by the schema as settle checks a manifest, so that what the value names (a measure map, an element a statement names) is found wherever it lies in the manifest. The complete form, or the schema’s first problem with its path from the manifest.

Parameters#

probe#

unknown

Returns#

Problem | CompleteManifest


readManifestFile()#

readManifestFile(text): LoadError | ReadManifestFile

Defined in: manifest/io.ts:577

A manifest from a file’s text (loadManifest) and how the text writes it (TimeToShare’s fileForm), so that the manifest is written back as it came.

Parameters#

text#

string

Returns#

LoadError | ReadManifestFile


readMeasureMap()#

readMeasureMap(value): Problem | { }

Defined in: manifest/io.ts:514

A measure map given to a command, read through the schema boundary as the one measure map of an empty manifest of its own and returned in its complete form, its unknown keys kept; or the first problem, with its path from the measure map.

Parameters#

value#

JsonObject

Returns#

Problem | { }


saveManifest()#

saveManifest(manifest, file?): string

Defined in: manifest/io.ts:591

A manifest’s text as a file of the form file writes it (TimeToShare’s dumpsFile), each member not given as NEW_MANIFEST_FILE says, every ID written #id (withFileIds) and the full context a file writes (withFullContext): the format’s terms and every prefix the statements use.

Parameters#

manifest#

Manifest

file?#

Partial<FileForm> = {}

Returns#

string

Throws#

for a manifest the schema or the invariants refuse.


schemaChecked()#

schemaChecked(value): Problem | { }

Defined in: manifest/io.ts:140

A manifest written with bare IDs, as TiLiE holds every manifest, as the schema accepts it, or the schema’s first problem: the value as a file writes it (manifestFileValue) is checked, and the problem’s path leads into the value itself (idFormPath). The value is returned as TiLiE holds it, its @context cut to the prefixes it declares itself (withStatementContext). The one schema check of a manifest TiLiE holds.

The file form differs from the value only in its IDs, written #id, and its full context, so the value itself is returned with the context core holds of the checked file form (withContextOf), its IDs never read back from the file form. A value without @context declares no prefix, so it is held without one as it is.

Parameters#

value#

unknown

Returns#

Problem | { }


schemaProblems()#

schemaProblems(value): Problem[]

Defined in: manifest/io.ts:219

The schema’s first problem of value, as a list; empty when the schema accepts it.

Parameters#

value#

unknown

Returns#

Problem[]


unknownKeys()#

unknownKeys(manifest): UnknownKey[]

Defined in: manifest/io.ts:196

The keys of a manifest TiLiE holds, its IDs bare, that its schema does not declare (TimeToShare’s unknownKeys of its file form with the full context a file writes, manifestFileValue), each path into the manifest itself.

Parameters#

manifest#

unknown

Returns#

UnknownKey[]

Throws#

for a manifest the schema refuses.


withHeldIds()#

withHeldIds<T>(value): LoadError | T

Defined in: manifest/io.ts:181

A manifest value in the file form, its IDs written #id, with every ID bare (withBareIds), unchecked otherwise: what TiLiE holds of a value read from outside that its commands check, such as a manifest text applied to a block. A text that writes no ID where one stands is refused at its path.

Type Parameters#

T#

T

Parameters#

value#

T

Returns#

LoadError | T