Record module
The Record module contains functions for working with records in a dynamic manner.
getMembers
Signature: (record: {}) -> { label: text, value: unknown }*
Converts the record into a sequence of label/value pairs.
fromMembers
Signature: (members: {label: text, value: unknown}*) -> {}
Converts a sequence of label/value pairs into a record. The type of the record will be empty. To work with the members using dot notation, you can use type narrowing.
fromFunction
Signature: (f: (label: text) -> unknown) -> T
Creates a record based on a type and a function.
Last updated