trait
Call Signature
Section titled “Call Signature”trait(
schema?):TagTrait
A trait no dump, stream or checkpoint names: state a world keeps for
itself, such as a list a room’s system rebuilds each step, or a
behaviour’s record, which defineBehaviour names. State a page draws,
a save keeps or the devtools show uses defineTrait, which names it.
Its writes take the writer any trait’s do; with no reach declared, a
write reads it as streamed, the strictest. With no schema it is a tag.
As koota’s own trait.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
schema? |
Record<string, never> |
Returns
Section titled “Returns”Call Signature
Section titled “Call Signature”trait<
S>(schema,options?):Trait<Norm<S>>
A trait no dump, stream or checkpoint names: state a world keeps for
itself, such as a list a room’s system rebuilds each step, or a
behaviour’s record, which defineBehaviour names. State a page draws,
a save keeps or the devtools show uses defineTrait, which names it.
Its writes take the writer any trait’s do; with no reach declared, a
write reads it as streamed, the strictest. With no schema it is a tag.
As koota’s own trait.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
S extends Schema |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
schema |
S |
options? |
ScratchTraitOptions<keyof TraitRecord<S> & string> |
Returns
Section titled “Returns”Trait<Norm<S>>