UNPKG

@rbxts/create-slice

Version:

Helpful function to easily define rodux reducers.

21 lines (20 loc) 941 B
/// <reference types="@rbxts/compiler-types" /> /// <reference types="@rbxts/compiler-types" /> /// <reference types="@rbxts/compiler-types" /> /** * Casts an object to a Map type. This is a workaround for challenges with * iterating over an object or array. * @param object The object to cast. * @returns The object as a Map. */ export declare function entries<T>(object: T): Map<keyof T, T[keyof T]>; export declare function entries<K extends string | number | symbol, V>(object: Record<K, V>): Map<K, V>; export declare function entries<K, V>(object: any): Map<K, V>; /** * Returns the keys of an object as an array.s * @param object The object to get the keys of. * @returns The keys of the object. */ export declare function keys<K extends string | number | symbol>(object: Record<K, any>): K[]; export declare function keys<T>(object: T): Array<keyof T>; export declare function keys<K>(object: any): K[];