Class
OpaqueInfo
View sourceExtendsTypeInfo
Describes metadata for a reflected type with an intentionally opaque structure.
Opaque metadata records only the opaque kind. It does not describe fields
or validate values of the reflected type. Use OpaqueInfo.default
for the standard metadata instance.
Examples
import { OpaqueInfo } from '@wimaengine/reflect'
const info = OpaqueInfo.default()
info.serialize() // { kind: 'opaque' }
OpaqueInfo.validateSerial({ kind: 'opaque' }) // trueConstructor
Methods
serialize(): OpaqueInfoSerial
View sourceReturns the opaque metadata serial for this instance.
The instance has no fields to inspect, so serialization always returns a
new object with only kind: 'opaque'.
staticserialize(_value: OpaqueInfo): OpaqueInfoSerial
View sourceSerializes opaque metadata.
The supplied instance is not inspected because all OpaqueInfo instances
have the same serial form.
staticdefault(): OpaqueInfo
View sourceCreates the default opaque metadata instance.
staticdeserialize(_value: OpaqueInfoSerial, out?: OpaqueInfo): OpaqueInfo
View sourceRestores opaque metadata into an instance.
Opaque metadata has no state to restore, so this method returns the
supplied out instance unchanged, or creates and returns a new instance.
It does not inspect _value; callers should validate the serial first.
staticvalidateSerial(value: unknown): value is OpaqueInfoSerial
View sourceChecks whether a value has the opaque metadata serial shape.
Validation accepts a non-null, non-array object whose kind property is
exactly 'opaque'. It validates metadata shape, not a runtime value, and
permits additional properties on the serial object.
