-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathtypes.d.ts
More file actions
50 lines (46 loc) · 960 Bytes
/
Copy pathtypes.d.ts
File metadata and controls
50 lines (46 loc) · 960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
type ErrorBoundaryProps = {
errorMessage?: Function,
fallbackUI?: Function
};
type ErrorBoundaryState = {
treeHasError: boolean,
treeError: {
error: boolean | string,
info: string
}
};
type FloodgateProps = {
children: (args: {
items: Array<any>,
loadComplete: boolean,
loadAll: Function,
loadNext: Function,
reset: Function,
exportState: Function
}) => JSX.Element,
data: any[],
increment: number,
initial: number,
exportStateOnUnmount?: boolean,
onExportState?: Function,
onLoadNext?: Function,
onLoadComplete?: Function,
onReset?: Function
};
type FloodgateState = {
items: any[],
renderedItems: any[],
allItemsRendered: boolean,
currentIndex?: number,
prevProps: {
data: FloodgateProps['data'],
increment: FloodgateProps['increment'],
initial: FloodgateProps['initial']
}
};
export {
ErrorBoundaryProps,
ErrorBoundaryState,
FloodgateProps,
FloodgateState
};