(key: Key)
| 29 | >(); |
| 30 | |
| 31 | function normalizeKey(key: Key): string { |
| 32 | if (typeof key === 'string') { |
| 33 | return key.replace(/\s*/g, ''); |
| 34 | } |
| 35 | |
| 36 | return '' + key; |
| 37 | } |
| 38 | |
| 39 | export function getItemId<T>(state: ListState<T>, itemKey: Key): string { |
| 40 | let data = listData.get(state); |