manifest/invariants#
Functions#
checkOrdered()#
checkOrdered(
manifest):Problem[]
Defined in: manifest/invariants.ts:147
Every invariant violation of a manifest in canonical order, in traversal order, root by root.
Parameters#
manifest#
Returns#
Problem[]
childEnd()#
childEnd(
offset,length):Real
Defined in: manifest/invariants.ts:42
The end of a child at offset with length on its parent’s axis: their sum.
Parameters#
offset#
length#
Returns#
childReach()#
childReach(
offset,child):Real
Defined in: manifest/invariants.ts:58
The farthest point a child at offset reaches on its parent’s axis: its
end where its length is known, its offset where it is not.
Parameters#
offset#
child#
{ }
Returns#
contentEnd()#
contentEnd(
timeline):Real
Defined in: manifest/invariants.ts:67
The farthest point on a timeline’s axis its children reach (childReach);
0 without children.
Parameters#
timeline#
{ }
Returns#
isProblem()#
isProblem(
value):value is Problem
Defined in: manifest/invariants.ts:37
Whether value is a problem: an object with a code and a path.
Parameters#
value#
unknown
Returns#
value is Problem
lengthOf()#
lengthOf(
timeline):Coordinate|null
Defined in: manifest/invariants.ts:50
The length of a timeline on its own axis, or null when it is not known. The timeline is one of a checked manifest, so its length reads.
Parameters#
timeline#
{ }
Returns#
Coordinate | null
readOnAxis()#
readOnAxis(
value,timeline,path):Problem|Coordinate
Defined in: manifest/invariants.ts:21
Read a bare value on the own axis of timeline (axisCoordinate): the
coordinate, or an invalid_coordinate problem at path.
Parameters#
value#
unknown
timeline#
Pick<TimelineManifest, "unit" | "number_type">
path#
readonly PathSegment[]
Returns#
spelled()#
spelled(
value):string
Defined in: manifest/invariants.ts:77
A bare value as a message spells it: a fraction pair as [n, d].
Parameters#
value#
unknown
Returns#
string