forked from cap-collectif/cap-collectif
-
Notifications
You must be signed in to change notification settings - Fork 0
/
global.d.ts
77 lines (74 loc) · 2.16 KB
/
global.d.ts
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
export {}
declare global {
interface Window {
locale: string
intl_messages: string
__REDUX_DEVTOOLS_EXTENSION__: Function
MAPBOX_PUBLIC_TOKEN: string | null
MAPBOX_PUBLIC_STYLE_OWNER: string | null
MAPBOX_PUBLIC_STYLE_ID: string | null
}
type ReactRelayReadyState = {
error: Error | null | undefined
props: Object | null | undefined
retry: (() => void) | null | undefined
}
type ReduxFormFormProps = {
anyTouched: boolean
array: {
insert: (field: string, index: number, value: any) => void
move: (field: string, from: number, to: number) => void
pop: (field: string) => void
push: (field: string, value: any) => void
remove: (field: string, index: number) => void
removeAll: (field: string) => void
shift: (field: string) => void
splice: (field: string, index: number, removeNum: number, value: any) => void
swap: (field: string, indexA: number, indexB: number) => void
unshift: (field: string, value: any) => void
}
asyncValidate: () => void
asyncValidating: boolean
autofill: (field: string, value: any) => void
blur: (field: string, value: any) => void
change: (field: string, value: any) => void
clearAsyncError: (field: string) => void
clearSubmit: () => void
destroy: () => void
dirty: boolean
dispatch: Function
error: string | null | undefined
form: string
handleSubmit: (eventOrSubmit: any) => void | Promise<any>
initialize: (data: Object) => void
initialized: boolean
invalid: boolean
pristine: boolean
reset: () => void
submitting: boolean
submitFailed: boolean
submitSucceeded: boolean
touch: (...fields: string[]) => void
untouch: (...fields: string[]) => void
updateSyncErrors: () => void
valid: boolean
warning: any
// for now
} & any
type ReduxFormFieldArrayProps = {
fields: ReduxFormFields
meta: {
dirty: boolean
error?: any
form: string
invalid: boolean
pristine: boolean
submitting: boolean
submitFailed: boolean
touched: boolean
valid: boolean
warning?: any
}
ref?: any
}
}