Package: effect
Module: SchemaAST
Represents an index signature entry within an Objects node.
When to use
Use when constructing or inspecting object AST entries for record-like keys and values.
Details
parameter — the key type AST (e.g. String for string keys,
TemplateLiteral for patterned keys).type — the value type SchemaAST.merge — optional KeyValueCombiner for handling duplicate keys.Gotchas
Using Schema.optionalKey on the value type is not allowed for index
signatures (throws at construction); use Schema.optional instead.
See
ObjectsPropertySignatureSignature
declare class IndexSignature { constructor(
parameter: AST,
type: AST,
merge: KeyValueCombiner | undefined
) }
Since v3.10.0