MCPcopy
hub / github.com/buildbot/buildbot / useDataApiSinglePropertiesQuery

Function useDataApiSinglePropertiesQuery

www/data-module/src/data/ReactUtils.ts:127–131  ·  view source on GitHub ↗
(
  el: T | null, dependencies: any[], callback: (el: T) => DataPropertiesCollection)

Source from the content-addressed store, hash-verified

125}
126
127export 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
133export function findOrNull<T>(array: IObservableArray<T>, filter: (el: T) => boolean): T | null {
134 for (const el of array) {

Callers 1

Calls 1

useDataApiDynamicQueryFunction · 0.85

Tested by

no test coverage detected