fix spelling
This commit is contained in:
parent
75d585880f
commit
00c99cefc8
@ -65,7 +65,7 @@ export function isLoaded<T>(loadableValue: LoadableValue<T>): loadableValue is L
|
||||
return loadableValue.value !== undefined;
|
||||
}
|
||||
|
||||
export interface CancelledScrollingEnd<T> {
|
||||
export interface CanceledScrollingEnd<T> {
|
||||
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<T> {
|
||||
cancel: () => void;
|
||||
loading: false;
|
||||
}
|
||||
export type LoadableScrollingEnd<T> = CancelledScrollingEnd<T> | LoadingScrollingEnd<T> | LoadedScrollingEnd<T> | FailedScrollingEnd<T>;
|
||||
export function createCancelledScrollingEnd<T>(loadingScrollingEnd: LoadingScrollingEnd<T>): CancelledScrollingEnd<T> {
|
||||
export type LoadableScrollingEnd<T> = CanceledScrollingEnd<T> | LoadingScrollingEnd<T> | LoadedScrollingEnd<T> | FailedScrollingEnd<T>;
|
||||
export function createCancelledScrollingEnd<T>(loadingScrollingEnd: LoadingScrollingEnd<T>): CanceledScrollingEnd<T> {
|
||||
return { ...loadingScrollingEnd, loading: false };
|
||||
}
|
||||
export function createLoadingScrollingEnd<T>(fetch: (reference: T) => Promise<void>, cancel: () => void): LoadingScrollingEnd<T> {
|
||||
|
Loading…
Reference in New Issue
Block a user