github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/webapp/javascript/pages/loading.ts (about) 1 export type LoadingType = 'pristine' | 'loading' | 'reloading' | 'loaded'; 2 3 /** 4 * returns true if at least one source is in 'loading' or 'reloading' state 5 */ 6 export function isLoadingOrReloading(sources: LoadingType[]) { 7 return sources.some((state) => { 8 return state === 'loading' || state === 'reloading'; 9 }); 10 }