/** * Helper functions that have to do with TypeScript tuples. * * @module */ import type { Tuple } from "../types/Tuple.js"; type TupleKey = { [L in T["length"]]: Exclude>["length"], L>; }[T["length"]]; type TupleValue = T[0]; type TupleEntry = [TupleKey, TupleValue]; /** * Helper function to get the entries (i.e., indexes and values) of a tuple in a type-safe way. * * This is useful because the vanilla `Array.entries` method will always have the keys be of type * `number`. */ export declare function tupleEntries(tuple: T): Generator>; /** * Helper function to get the keys (i.e., indexes) of a tuple in a type-safe way. * * This is useful because the vanilla `Array.keys` method will always have the keys be of type * `number`. */ export declare function tupleKeys(tuple: T): Generator>; export {}; //# sourceMappingURL=tuple.d.ts.map