The type of object values this type can write
The type of object values this type will read
A mapping of field names to their types.
An array of the field names with their corresponding types.
Fields are sorted lexicographically by name,
so that passing in equivalent fields
objects
to the constructor always gives the same result.
Field names' UTF-8 representations are also cached.
Requires that the buffer be a GrowableBuffer or AppendableStream
The value to assert is an AppendableBuffer
Determines whether the input is a Type with the same class
A value, usually a Type instance
whether this
and otherType
are instances of the same Type class
Appends value bytes to an AppendableBuffer according to the type
Example:
type.writeValue(buffer, {
name: 'Gertrude',
age: 29,
netWorth: 1.2e6
})
The buffer to which to append
The value to write
Generated using TypeDoc
Intended to model a generic JavaScript object, whose field names are known in advance. If field names are part of the value rather than the type, use a MapType instead.
The value passed into the constructor should resemble the values to be written. For example, to write
{a: 100, b: 'abc', c: false}
, you could use:Example: