Function record

  • Creates the shape that describes an object with string keys and values that conform the given shape.

    Type Parameters

    • ValueShape extends AnyShape

      The value shape.

    Parameters

    • valueShape: ValueShape

      The shape of the record values.

    • Optional options: IssueOptions | Message

      The issue options or the issue message.

    Returns RecordShape<null, ValueShape>

  • Creates the shape that describes an object with string keys and values that conform the given shape.

    Type Parameters

    • KeyShape extends Shape<string, PropertyKey>

      The key shape.

    • ValueShape extends AnyShape

      The value shape.

    Parameters

    • keyShape: KeyShape

      The shape of record keys.

    • valueShape: ValueShape

      The shape of the record values.

    • Optional options: IssueOptions | Message

      The issue options or the issue message.

    Returns RecordShape<KeyShape, ValueShape>