�PNG  IHDR��;���IDATx��ܻn�0���K�� �)(�pA��� ���7�LeG{�� �§㻢|��ذaÆ 6lذaÆ 6lذaÆ 6lom��$^�y���ذag�5bÆ 6lذaÆ 6lذa{���� 6lذaÆ �`����}H�Fkm�,�m����Ӫ���ô�ô!� �x�|'ܢ˟;�E:���9�&ᶒ�}�{�v]�n&�6� �h��_��t�ڠ͵-ҫ���Z;��Z$�.�P���k�ž)�!��o���>}l�eQfJ�T��u і���چ��\��X=8��Rن4`Vw�l�>����n�G�^��i�s��"ms�$�u��i��?w�bs[m�6�K4���O���.�4��%����/����b�C%��t ��M�ז� �-l�G6�mrz2���s�%�9��s@���-�k�9�=���)������k�B5����\��+͂�Zsٲ ��Rn��~G���R���C����� �wIcI��n7jJ���hۛNCS|���j0��8y�iHKֶۛ�k�Ɉ+;Sz������L/��F�*\��Ԕ�#"5��m�2��[S��������=�g��n�a�P�e�ғ�L�� lذaÆ 6l�^k��̱aÆ 6lذaÆ 6lذa;���� �_��ذaÆ 6lذaÆ 6lذaÆ ���R���IEND�B` type MapKey = BaseType extends Map ? KeyType : never; type MapValue = BaseType extends Map ? ValueType : never; export type ArrayEntry = [number, BaseType[number]]; export type MapEntry = [MapKey, MapValue]; export type ObjectEntry = [keyof BaseType, BaseType[keyof BaseType]]; export type SetEntry = BaseType extends Set ? [ItemType, ItemType] : never; /** Many collections have an `entries` method which returns an array of a given object's own enumerable string-keyed property [key, value] pairs. The `Entry` type will return the type of that collection's entry. For example the {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries|`Object`}, {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/entries|`Map`}, {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/entries|`Array`}, and {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/entries|`Set`} collections all have this method. Note that `WeakMap` and `WeakSet` do not have this method since their entries are not enumerable. @see `Entries` if you want to just access the type of the array of entries (which is the return of the `.entries()` method). @example ``` import {Entry} from 'type-fest'; interface Example { someKey: number; } const manipulatesEntry = (example: Entry) => [ // Does some arbitrary processing on the key (with type information available) example[0].toUpperCase(), // Does some arbitrary processing on the value (with type information available) example[1].toFixed(), ]; const example: Example = {someKey: 1}; const entry = Object.entries(example)[0] as Entry; const output = manipulatesEntry(entry); // Objects const objectExample = {a: 1}; const objectEntry: Entry = ['a', 1]; // Arrays const arrayExample = ['a', 1]; const arrayEntryString: Entry = [0, 'a']; const arrayEntryNumber: Entry = [1, 1]; // Maps const mapExample = new Map([['a', 1]]); const mapEntry: Entry = ['a', 1]; // Sets const setExample = new Set(['a', 1]); const setEntryString: Entry = ['a', 'a']; const setEntryNumber: Entry = [1, 1]; ``` */ export type Entry = BaseType extends Map ? MapEntry : BaseType extends Set ? SetEntry : BaseType extends unknown[] ? ArrayEntry : BaseType extends object ? ObjectEntry : never;