waygraph / ReadPage
Class: ReadPage
Defined in: src/engine/read/read-page.ts:5
Constructors
Constructor
new ReadPage(
values,notes?):ReadPage
Defined in: src/engine/read/read-page.ts:12
Parameters
values
ReadonlyMap<string, unknown>
notes?
ReadonlyMap<string, string> = ...
Returns
ReadPage
Properties
missing
readonlymissing: readonlystring[]
Defined in: src/engine/read/read-page.ts:8
Paths the page did not show (null in toJSON).
notes
readonlynotes:Readonly<Record<string,string>>
Defined in: src/engine/read/read-page.ts:10
Why a path is missing or partial, e.g. a table column that isn't there, or rows not rendered yet.
Methods
get()
get<
T>(key):T
Defined in: src/engine/read/read-page.ts:45
The value the page showed for key, typed by the key. Throws (naming the key) when this read did not include it or the page did not show it - like mem.get on a key never set.
Type Parameters
T
T
Parameters
key
ReadKey<T>
Returns
T
has()
has<
T>(key):boolean
Defined in: src/engine/read/read-page.ts:36
True when the page showed key (a read that found nothing is not shown).
Type Parameters
T
T
Parameters
key
ReadKey<T>
Returns
boolean
toJSON()
toJSON():
Record<string,unknown>
Defined in: src/engine/read/read-page.ts:51
The read as one object, nested by key path ({ post: { title, comments: [...] } }); missing paths are null.
Returns
Record<string, unknown>