@eagleoutice/flowr - v2.15.8
    Preparing search index...

    Variable RecordConst

    Record: {
        entries<K extends string, V>(
            this: void,
            object: Partial<Record<K, V>>,
        ): [K, V][];
        has<K extends string>(
            this: void,
            object: Partial<Record<K, unknown>>,
            key: string,
        ): key is K;
        keys<K extends string | number>(
            this: void,
            object: Partial<Record<K, unknown>>,
        ): K[];
        map<K1 extends string, K2 extends string, V1, V2>(
            this: void,
            object: Record<K1, V1>,
            callbackfn: (
                entry: [K1, V1],
                index: number,
                entries: [K1, V1][],
            ) => [K2, V2],
        ): Record<K2, V2>;
        mapKeys<K1 extends string, K2 extends string, V>(
            this: void,
            object: Record<K1, V>,
            callbackfn: (key: K1, index: number, entries: [K1, V][]) => K2,
        ): Record<K2, V>;
        mapPartial<K1 extends string, K2 extends string, V1, V2>(
            this: void,
            object: Partial<Record<K1, V1>>,
            callbackfn: (
                entry: [K1, V1],
                index: number,
                entries: [K1, V1][],
            ) => [K2, V2],
        ): Partial<Record<K2, V2>>;
        mapPartialKeys<K1 extends string, K2 extends string, V>(
            this: void,
            object: Partial<Record<K1, V>>,
            callbackfn: (key: K1, index: number, entries: [K1, V][]) => K2,
        ): Partial<Record<K2, V>>;
        mapPartialProps<K extends string, V1, V2>(
            this: void,
            object: Partial<Record<K, V1>>,
            callbackfn: (value: V1, index: number, entries: [K, V1][]) => V2,
        ): Partial<Record<K, V2>>;
        mapProps<K extends string, V1, V2>(
            this: void,
            object: Record<K, V1>,
            callbackfn: (value: V1, index: number, entries: [K, V1][]) => V2,
        ): Record<K, V2>;
        name: "Record";
        properties<K extends string, V, O extends Partial<Record<K, V>>>(
            this: void,
            object: O,
        ): [keyof O, O[keyof (...)]][];
        values<K extends string, V>(this: void, object: Partial<Record<K, V>>): V[];
    } = ...

    Helper for transforming records.

    Type Declaration

    • entries: function
      • Returns an array of the key-value pairs of the properties of a record.

        Type Parameters

        • K extends string
        • V

        Parameters

        • this: void
        • object: Partial<Record<K, V>>

          The record to get the properties from.

        Returns [K, V][]

    • has: function
      • Checks whether a key is a property of a record.

        Type Parameters

        • K extends string

        Parameters

        • this: void
        • object: Partial<Record<K, unknown>>

          The record to check the key for.

        • key: string

          The ley to check for.

        Returns key is K

    • keys: function
      • Returns an array of the names of the properties of a record.

        Type Parameters

        • K extends string | number

        Parameters

        • this: void
        • object: Partial<Record<K, unknown>>

          The record to get the property names from.

        Returns K[]

    • map: function
      • Transforms a record by applying a callback function to each key-value pair in the record.

        Type Parameters

        • K1 extends string
        • K2 extends string
        • V1
        • V2

        Parameters

        • this: void
        • object: Record<K1, V1>

          The record that should be transformed.

        • callbackfn: (entry: [K1, V1], index: number, entries: [K1, V1][]) => [K2, V2]

          The callback function that transforms each key-value pair of the record.

        Returns Record<K2, V2>

        Record.mapPartial for a version that works with partial records.

    • mapKeys: function
      • Transforms a record by applying a callback function to each key in the record.

        Type Parameters

        • K1 extends string
        • K2 extends string
        • V

        Parameters

        • this: void
        • object: Record<K1, V>

          The record that should be transformed.

        • callbackfn: (key: K1, index: number, entries: [K1, V][]) => K2

          The callback function that transforms each key of the record.

        Returns Record<K2, V>

        Record.mapPartialKeys for a version that works with partial records.

    • mapPartial: function
      • Transforms a partial record by applying a callback function to each key-value pair in the record.

        Type Parameters

        • K1 extends string
        • K2 extends string
        • V1
        • V2

        Parameters

        • this: void
        • object: Partial<Record<K1, V1>>

          The record that should be transformed.

        • callbackfn: (entry: [K1, V1], index: number, entries: [K1, V1][]) => [K2, V2]

          The callback function that transforms each key-value pair of the record.

        Returns Partial<Record<K2, V2>>

        Record.map for a version that works with required records.

    • mapPartialKeys: function
      • Transforms a partial record by applying a callback function to each key in the record.

        Type Parameters

        • K1 extends string
        • K2 extends string
        • V

        Parameters

        • this: void
        • object: Partial<Record<K1, V>>

          The record that should be transformed.

        • callbackfn: (key: K1, index: number, entries: [K1, V][]) => K2

          The callback function that transforms each key of the record.

        Returns Partial<Record<K2, V>>

        Record.mapKeys for a version that works with required records.

    • mapPartialProps: function
      • Transforms a partial record by applying a callback function to each property value in the record.

        Type Parameters

        • K extends string
        • V1
        • V2

        Parameters

        • this: void
        • object: Partial<Record<K, V1>>

          The record that should be transformed.

        • callbackfn: (value: V1, index: number, entries: [K, V1][]) => V2

          The callback function that transforms each property value of the record.

        Returns Partial<Record<K, V2>>

        Record.mapProps for a version that works with required records.

    • mapProps: function
      • Transforms a record by applying a callback function to each property value in the record.

        Type Parameters

        • K extends string
        • V1
        • V2

        Parameters

        • this: void
        • object: Record<K, V1>

          The record that should be transformed.

        • callbackfn: (value: V1, index: number, entries: [K, V1][]) => V2

          The callback function that transforms each property value of the record.

        Returns Record<K, V2>

        Record.mapPartialProps for a version that works with partial records.

    • Readonlyname: "Record"
    • properties: function
      • Returns an array of the key-value pairs of the properties of a record.

        Type Parameters

        • K extends string
        • V
        • O extends Partial<Record<K, V>>

        Parameters

        • this: void
        • object: O

          The record to get the properties from.

        Returns [keyof O, O[keyof (...)]][]

    • values: function
      • Returns an array of the values of the properties of a record.

        Type Parameters

        • K extends string
        • V

        Parameters

        • this: void
        • object: Partial<Record<K, V>>

          The record to get the property values from.

        Returns V[]