( el: T | null, dependencies: any[], callback: (el: T) => DataPropertiesCollection)
| 125 | } |
| 126 | |
| 127 | export function useDataApiSinglePropertiesQuery<T extends BaseClass>( |
| 128 | el: T | null, dependencies: any[], callback: (el: T) => DataPropertiesCollection): DataPropertiesCollection { |
| 129 | return useDataApiDynamicQuery([el === null, ...dependencies], |
| 130 | () => el === null ? new DataPropertiesCollection() : callback(el)); |
| 131 | } |
| 132 | |
| 133 | export function findOrNull<T>(array: IObservableArray<T>, filter: (el: T) => boolean): T | null { |
| 134 | for (const el of array) { |
no test coverage detected