Union of string and number types.
Commonly used for object keys, array indices, and ID types that can be either string or numeric.
function getItem<T>(collection: Record<StrOrNum, T>, key: StrOrNum): T | undefined Copy
function getItem<T>(collection: Record<StrOrNum, T>, key: StrOrNum): T | undefined
Union of string and number types.
Commonly used for object keys, array indices, and ID types that can be either string or numeric.