/** Safer alternative to Array.isArray that... * - doesn't narrow to any[] * - works with readonly arrays */ declare const isArray: (data: unknown) => data is ReadonlyArray; /** * extracts entries mimicking Object.entries, accounting for whether the * object is an array */ type entryOf = { [k in keyof o]-?: [k, o[k] & ({} | null)]; }[o extends ReadonlyArray ? keyof o & number : keyof o] & unknown; /** * Object.entries wrapper providing narrowed types for objects with known sets * of keys, e.g. those defined internally as configs * * @param o the object to get narrowed entries from * @returns a narrowed array of entries based on that object's type */ declare const entriesOf: (o: o) => entryOf[]; /** * Throws an error with the specified message and constructor. * * @param {string} message - The error message. * @param {new (message: string) => Error} [ctor=Error] - The error constructor. Defaults to the built-in Error constructor. * @throws {Error} Throws an error with the specified message. */ declare const throwError: (message: string, ctor?: new (message: string) => Error) => never; /** * @description A primative value that can be interpolated into a string */ type StringifiablePrimative = string | number | bigint | boolean; export { type StringifiablePrimative, entriesOf, type entryOf, isArray, throwError };