(object: {[_ in K]?: T[]}, key: K, ...args: Args)
| 115 | export const isObject = (o: unknown): o is object => typeof o === 'object' && !!o |
| 116 | |
| 117 | export function callArrayProp< |
| 118 | K extends PropertyKey, |
| 119 | T extends (...args: Args) => void, |
| 120 | Args extends unknown[], |
| 121 | >(object: {[_ in K]?: T[]}, key: K, ...args: Args): void { |
| 122 | const arr = object[key] |
| 123 | if (arr) for (const cb of arr) cb(...args) |
| 124 | } |
| 125 | |
| 126 | export function pushToArrayProp<K extends PropertyKey, T>( |
| 127 | object: {[_ in K]?: T[]}, |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…