inspector/codec#
Interfaces#
Codec#
Defined in: editor/src/inspector/codec.ts:35
Writing and reading one format, and finding a place in its text.
Methods#
locate()#
locate(
text,path):Lines|null
Defined in: editor/src/inspector/codec.ts:39
The lines of text holding the value at path; null where it holds none.
Parameters#
text#
string
path#
readonly PathSegment[]
Returns#
Lines | null
read()#
Defined in: editor/src/inspector/codec.ts:37
Parameters#
text#
string
Returns#
write()#
Defined in: editor/src/inspector/codec.ts:36
Parameters#
value#
Returns#
Read#
Defined in: editor/src/inspector/codec.ts:29
What reading a text gives: the manifest value and the document.
Properties#
source#
readonlysource:Source
Defined in: editor/src/inspector/codec.ts:31
value#
readonlyvalue:Json
Defined in: editor/src/inspector/codec.ts:30
Source#
Defined in: editor/src/inspector/codec.ts:17
The parsed document behind a text. patch changes the document to hold
value, keeping everything of the text that value does not change, and
returns the new text.
Properties#
format#
readonlyformat:"yaml"|"json"|"toml"
Defined in: editor/src/inspector/codec.ts:18
Methods#
patch()#
patch(
value):Result<string>
Defined in: editor/src/inspector/codec.ts:19
Parameters#
value#
Returns#
Result<string>
Text#
Defined in: editor/src/inspector/codec.ts:23
A text and the document it was written from or read into.
Properties#
source#
readonlysource:Source
Defined in: editor/src/inspector/codec.ts:25
text#
readonlytext:string
Defined in: editor/src/inspector/codec.ts:24
Type Aliases#
Format#
Format = typeof
FORMATS[number]
Defined in: editor/src/inspector/codec.ts:10
One of the formats: yaml, json or toml.
Variables#
FORMATS#
constFORMATS: readonly ["yaml","json","toml"]
Defined in: editor/src/inspector/codec.ts:8
The formats in the order the format switches list them: YAML, the main serialization, first.