diff --git a/src/client/webapp/elements/require/loadables.ts b/src/client/webapp/elements/require/loadables.ts index 482ddb8..d4dfb50 100644 --- a/src/client/webapp/elements/require/loadables.ts +++ b/src/client/webapp/elements/require/loadables.ts @@ -65,7 +65,7 @@ export function isLoaded(loadableValue: LoadableValue): loadableValue is L return loadableValue.value !== undefined; } -export interface CancelledScrollingEnd { +export interface CanceledScrollingEnd { hasMore: undefined | boolean; // Could be set to a boolean if we delete from opposite end while adding new elements hasError: undefined; error: undefined; @@ -97,8 +97,8 @@ export interface FailedScrollingEnd { cancel: () => void; loading: false; } -export type LoadableScrollingEnd = CancelledScrollingEnd | LoadingScrollingEnd | LoadedScrollingEnd | FailedScrollingEnd; -export function createCancelledScrollingEnd(loadingScrollingEnd: LoadingScrollingEnd): CancelledScrollingEnd { +export type LoadableScrollingEnd = CanceledScrollingEnd | LoadingScrollingEnd | LoadedScrollingEnd | FailedScrollingEnd; +export function createCancelledScrollingEnd(loadingScrollingEnd: LoadingScrollingEnd): CanceledScrollingEnd { return { ...loadingScrollingEnd, loading: false }; } export function createLoadingScrollingEnd(fetch: (reference: T) => Promise, cancel: () => void): LoadingScrollingEnd {