@just-func/types
v0.5.1
Published
Types for just-func code
Downloads
544
Readme
@just-func/types
Type System of just-func.
JustEmpty
: A empty value.JustUno
: A single value.JustDuo
: A value with meta.JustValue
: Infer type ofJustEmpty
,JustUno
, andJustDuo
.justValue()
: helper to defineJustValue
.JustResult
: Return value of a function compliant with just-func.JustFunction
: Functions that compliant with just-funcjustFunction()
: helper to defineJustFunction
.
Type guards
isJustEmpty()
isJustUno()
isJustDuo()
isJustValue()
Metadata
Metadata is a first-class concept in just-func.
A compliant just-func function can accept a JustMeta
value as its second parameter.
The parameter is read only and can never be modified by the calling function.
JustMeta
: The basic form of metadata.StackTraceMeta
: Metadata for function that can adjust its stack trace when error occurs.