Compiler-only type inspection and construction inside comptime function declarations. Every member is an ordinary checked compile-time value; none has a runtime representation.
The parameters a record or struct is constructed with, as a pack whose slots carry their names.
The one declared constructor's parameters, or the stored fields in declaration order when the declaration has no constructor; a field with a default, or one that admits nil, is an optional slot. Written as ...: unpackof nupp.types.construction(E), the pack is a parameter list a call binds by position or by name, the way it would for new E(...).
Arguments
Name
Type
Description
value
type
the record or struct to inspect
Returns
Type
Description
typepack
its construction contract
Raises
when the declaration has several constructors, which is no single contract
localdescribe:comptimefunction(value:type|typepack):{readonlykind:string,readonlysourceKind:string?,--- Reports the nominal declaration category without expanding a reference.readonlydeclarationKind:string?,readonlyname:string?,readonlyvalue:(string|boolean|integer)?,readonlyelement:type?,readonlymembers:{type}?,readonlyfields:{{readonlyname:string,readonlyread:type?,readonlywrite:type?}}?,readonlyindexer:type?,readonlyreadKey:type?,readonlyreadValue:type?,readonlywriteKey:type?,readonlywriteValue:type?,readonlynominal:boolean?,readonlyhead:{type}?,readonlytail:type?,readonlymodes:{string}?,readonlycount:integer?,readonlyparameters:typepack?,readonlyresults:typepack?}
Arguments
Name
Type
Description
value
type|typepack
Returns
Type
Description
{readonlykind:string,readonlysourceKind:string?,--- Reports the nominal declaration category without expanding a reference.readonlydeclarationKind:string?,readonlyname:string?,readonlyvalue:(string|boolean|integer)?,readonlyelement:type?,readonlymembers:{type}?,readonlyfields:{{readonlyname:string,readonlyread:type?,readonlywrite:type?}}?,readonlyindexer:type?,readonlyreadKey:type?,readonlyreadValue:type?,readonlywriteKey:type?,readonlywriteValue:type?,readonlynominal:boolean?,readonlyhead:{type}?,readonlytail:type?,readonlymodes:{string}?,readonlycount:integer?,readonlyparameters:typepack?,readonlyresults:typepack?}