Browse Source

gen-docs WIP

Daniel Zlotin 6 years ago
parent
commit
66e39817e3

+ 34
- 34
docs/api/Navigation.md View File

2
 
2
 
3
 ## Properties
3
 ## Properties
4
 
4
 
5
-- Element (any)
5
+- Element (`React.ComponentType<object>`)
6
 
6
 
7
 ## Methods
7
 ## Methods
8
 
8
 
14
 The component itself is a traditional React component extending React.Component.
14
 The component itself is a traditional React component extending React.Component.
15
 
15
 
16
 #### Arguments
16
 #### Arguments
17
-- componentName (string)
18
-- getComponentClassFunc (ComponentProvider)
17
+- componentName (`string`)
18
+- getComponentClassFunc (`ComponentProvider`)
19
 
19
 
20
 #### Returns
20
 #### Returns
21
-- (void)
21
+- (`void`)
22
 
22
 
23
 ### `setRoot(layout: any): Promise<any>`
23
 ### `setRoot(layout: any): Promise<any>`
24
 
24
 
27
 Reset the app to a new layout
27
 Reset the app to a new layout
28
 
28
 
29
 #### Arguments
29
 #### Arguments
30
-- layout (any)
30
+- layout (`any`)
31
 
31
 
32
 #### Returns
32
 #### Returns
33
-- (Promise<any>)
33
+- (`Promise<any>`)
34
 
34
 
35
 ### `setDefaultOptions(options: any): void`
35
 ### `setDefaultOptions(options: any): void`
36
 
36
 
39
 Set default options to all screens. Useful for declaring a consistent style across the app.
39
 Set default options to all screens. Useful for declaring a consistent style across the app.
40
 
40
 
41
 #### Arguments
41
 #### Arguments
42
-- options (any)
42
+- options (`any`)
43
 
43
 
44
 #### Returns
44
 #### Returns
45
-- (void)
45
+- (`void`)
46
 
46
 
47
 ### `mergeOptions(componentId: string, options: any): void`
47
 ### `mergeOptions(componentId: string, options: any): void`
48
 
48
 
51
 Change a component's navigation options
51
 Change a component's navigation options
52
 
52
 
53
 #### Arguments
53
 #### Arguments
54
-- componentId (string)
55
-- options (any)
54
+- componentId (`string`)
55
+- options (`any`)
56
 
56
 
57
 #### Returns
57
 #### Returns
58
-- (void)
58
+- (`void`)
59
 
59
 
60
 ### `showModal(layout: any): Promise<any>`
60
 ### `showModal(layout: any): Promise<any>`
61
 
61
 
64
 Show a screen as a modal.
64
 Show a screen as a modal.
65
 
65
 
66
 #### Arguments
66
 #### Arguments
67
-- layout (any)
67
+- layout (`any`)
68
 
68
 
69
 #### Returns
69
 #### Returns
70
-- (Promise<any>)
70
+- (`Promise<any>`)
71
 
71
 
72
 ### `dismissModal(componentId: string): Promise<any>`
72
 ### `dismissModal(componentId: string): Promise<any>`
73
 
73
 
76
 Dismiss a modal by componentId. The dismissed modal can be anywhere in the stack.
76
 Dismiss a modal by componentId. The dismissed modal can be anywhere in the stack.
77
 
77
 
78
 #### Arguments
78
 #### Arguments
79
-- componentId (string)
79
+- componentId (`string`)
80
 
80
 
81
 #### Returns
81
 #### Returns
82
-- (Promise<any>)
82
+- (`Promise<any>`)
83
 
83
 
84
 ### `dismissAllModals(): Promise<any>`
84
 ### `dismissAllModals(): Promise<any>`
85
 
85
 
88
 Dismiss all Modals
88
 Dismiss all Modals
89
 
89
 
90
 #### Returns
90
 #### Returns
91
-- (Promise<any>)
91
+- (`Promise<any>`)
92
 
92
 
93
 ### `push(componentId: string, layout: any): Promise<any>`
93
 ### `push(componentId: string, layout: any): Promise<any>`
94
 
94
 
97
 Push a new layout into this screen's navigation stack.
97
 Push a new layout into this screen's navigation stack.
98
 
98
 
99
 #### Arguments
99
 #### Arguments
100
-- componentId (string)
101
-- layout (any)
100
+- componentId (`string`)
101
+- layout (`any`)
102
 
102
 
103
 #### Returns
103
 #### Returns
104
-- (Promise<any>)
104
+- (`Promise<any>`)
105
 
105
 
106
 ### `pop(componentId: string, params: any): Promise<any>`
106
 ### `pop(componentId: string, params: any): Promise<any>`
107
 
107
 
110
 Pop a component from the stack, regardless of it's position.
110
 Pop a component from the stack, regardless of it's position.
111
 
111
 
112
 #### Arguments
112
 #### Arguments
113
-- componentId (string)
114
-- params (any)
113
+- componentId (`string`)
114
+- params (`any`)
115
 
115
 
116
 #### Returns
116
 #### Returns
117
-- (Promise<any>)
117
+- (`Promise<any>`)
118
 
118
 
119
 ### `popTo(componentId: string): Promise<any>`
119
 ### `popTo(componentId: string): Promise<any>`
120
 
120
 
123
 Pop the stack to a given component
123
 Pop the stack to a given component
124
 
124
 
125
 #### Arguments
125
 #### Arguments
126
-- componentId (string)
126
+- componentId (`string`)
127
 
127
 
128
 #### Returns
128
 #### Returns
129
-- (Promise<any>)
129
+- (`Promise<any>`)
130
 
130
 
131
 ### `popToRoot(componentId: string): Promise<any>`
131
 ### `popToRoot(componentId: string): Promise<any>`
132
 
132
 
135
 Pop the component's stack to root.
135
 Pop the component's stack to root.
136
 
136
 
137
 #### Arguments
137
 #### Arguments
138
-- componentId (string)
138
+- componentId (`string`)
139
 
139
 
140
 #### Returns
140
 #### Returns
141
-- (Promise<any>)
141
+- (`Promise<any>`)
142
 
142
 
143
 ### `setStackRoot(componentId: string, layout: any): Promise<any>`
143
 ### `setStackRoot(componentId: string, layout: any): Promise<any>`
144
 
144
 
147
 Sets new root component to stack.
147
 Sets new root component to stack.
148
 
148
 
149
 #### Arguments
149
 #### Arguments
150
-- componentId (string)
151
-- layout (any)
150
+- componentId (`string`)
151
+- layout (`any`)
152
 
152
 
153
 #### Returns
153
 #### Returns
154
-- (Promise<any>)
154
+- (`Promise<any>`)
155
 
155
 
156
 ### `showOverlay(layout: any): Promise<any>`
156
 ### `showOverlay(layout: any): Promise<any>`
157
 
157
 
160
 Show overlay on top of the entire app
160
 Show overlay on top of the entire app
161
 
161
 
162
 #### Arguments
162
 #### Arguments
163
-- layout (any)
163
+- layout (`any`)
164
 
164
 
165
 #### Returns
165
 #### Returns
166
-- (Promise<any>)
166
+- (`Promise<any>`)
167
 
167
 
168
 ### `dismissOverlay(componentId: string): Promise<any>`
168
 ### `dismissOverlay(componentId: string): Promise<any>`
169
 
169
 
172
 dismiss overlay by componentId
172
 dismiss overlay by componentId
173
 
173
 
174
 #### Arguments
174
 #### Arguments
175
-- componentId (string)
175
+- componentId (`string`)
176
 
176
 
177
 #### Returns
177
 #### Returns
178
-- (Promise<any>)
178
+- (`Promise<any>`)
179
 
179
 
180
 ### `events(): EventsRegistry`
180
 ### `events(): EventsRegistry`
181
 
181
 
184
 Obtain the events registry instance
184
 Obtain the events registry instance
185
 
185
 
186
 #### Returns
186
 #### Returns
187
-- (EventsRegistry)
187
+- (`EventsRegistry`)
188
 
188
 

+ 1
- 1
lib/src/Navigation.ts View File

13
 import { CommandsObserver } from './events/CommandsObserver';
13
 import { CommandsObserver } from './events/CommandsObserver';
14
 
14
 
15
 export class Navigation {
15
 export class Navigation {
16
-  public readonly Element;
16
+  public readonly Element: React.ComponentType<{ elementId: any; resizeMode: any; }>;
17
 
17
 
18
   private readonly store;
18
   private readonly store;
19
   private readonly nativeEventsReceiver;
19
   private readonly nativeEventsReceiver;

+ 1
- 1
scripts/gen-docs/templates/class.hbs View File

4
 ## Properties
4
 ## Properties
5
 
5
 
6
 {{#each properties}}
6
 {{#each properties}}
7
-- {{name}} ({{type}})
7
+- {{name}} (`{{type}}`)
8
 {{/each}}
8
 {{/each}}
9
 
9
 
10
 {{/if}}
10
 {{/if}}

+ 2
- 2
scripts/gen-docs/templates/method.hbs View File

9
 {{#if arguments}}
9
 {{#if arguments}}
10
 #### Arguments
10
 #### Arguments
11
 {{#each arguments}}
11
 {{#each arguments}}
12
-- {{name}} ({{type}})
12
+- {{name}} (`{{type}}`)
13
 {{/each}}
13
 {{/each}}
14
 
14
 
15
 {{/if}}
15
 {{/if}}
16
 #### Returns
16
 #### Returns
17
-- ({{returnType}})
17
+- (`{{returnType}}`)
18
 
18