Generic
A schema parameterized over a type.Generic: a schema parameterized over a type. You declare it with params (named type parameters, each with a default). You use a parameter with var, a type-variable reference such as { "var": "B" }. You instantiate the generic with args: { "type": X, "args": { "B": … } }. The parameter passes through references and falls back to its default when unbound. The worked example is Change<Block> (change), instantiated as example/myapp-change. The schema language has the details.
See also
Var schema: the type-variable reference.
Change: the library's generic Change<Block>.
Extension: the other way to reuse a schema.
The schema language: the full vocabulary.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime
Powered by Seed HypermediaOpen App