export type KeyOfType = keyof { // eslint-disable-next-line @typescript-eslint/no-explicit-any [P in keyof T as T[P] extends V ? P : never]: any } export type SelectorID = string | K export type SelectorRegistry = { registerSelector(id: string, obj: T, key: KeyOfType): void unregisterSelector(id: string): void selector(id: SelectorID): K }