File tree Expand file tree Collapse file tree 4 files changed +13
-9
lines changed
packages/rn-tester/js/utils Expand file tree Collapse file tree 4 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ function getLogBoxSymbolication(): {|
50
50
}
51
51
52
52
const createStack = ( methodNames : Array < string > ) =>
53
- methodNames . map ( methodName => ( {
53
+ methodNames . map ( ( methodName ) : StackFrame => ( {
54
54
column : null ,
55
55
file : 'file://path/to/file.js' ,
56
56
lineNumber : 1 ,
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ const symbolicateStackTrace: JestMockFn<
24
24
> = ( require ( '../../../Core/Devtools/symbolicateStackTrace' ) : any ) ;
25
25
26
26
const createStack = ( methodNames : Array < string > ) =>
27
- methodNames . map ( methodName => ( {
27
+ methodNames . map ( ( methodName ) : StackFrame => ( {
28
28
column : null ,
29
29
file : 'file://path/to/file.js' ,
30
30
lineNumber : 1 ,
Original file line number Diff line number Diff line change 9
9
* @oncall react_native
10
10
*/
11
11
12
+ import type { StackFrame } from '../../../Core/NativeExceptionsManager' ;
13
+
12
14
import LogBoxInspectorStackFrames , {
13
15
getCollapseMessage ,
14
16
} from '../LogBoxInspectorStackFrames' ;
@@ -33,7 +35,7 @@ const createLogWithFrames = (collapsedOptions: Array<?boolean>) => {
33
35
} ;
34
36
35
37
const createCollapsedFrames = ( collapsedOptions : Array < ?boolean > ) => {
36
- return collapsedOptions . map ( option => ( {
38
+ return collapsedOptions . map ( ( option ) : StackFrame => ( {
37
39
column : 1 ,
38
40
file : 'dependency.js' ,
39
41
lineNumber : 1 ,
Original file line number Diff line number Diff line change @@ -62,11 +62,13 @@ export const getExamplesListWithBookmarksAndRecentlyUsed = ({
62
62
return null ;
63
63
}
64
64
65
- const components = RNTesterList . Components . map ( componentExample => ( {
66
- ...componentExample ,
67
- isBookmarked : bookmarks . components . includes ( componentExample . key ) ,
68
- exampleType : Screens . COMPONENTS ,
69
- } ) ) ;
65
+ const components = RNTesterList . Components . map (
66
+ ( componentExample ) : RNTesterModuleInfo => ( {
67
+ ...componentExample ,
68
+ isBookmarked : bookmarks . components . includes ( componentExample . key ) ,
69
+ exampleType : Screens . COMPONENTS ,
70
+ } ) ,
71
+ ) ;
70
72
71
73
const recentlyUsedComponents = recentlyUsed . components
72
74
. map ( recentComponentKey =>
@@ -78,7 +80,7 @@ export const getExamplesListWithBookmarksAndRecentlyUsed = ({
78
80
component => component . isBookmarked ,
79
81
) ;
80
82
81
- const apis = RNTesterList . APIs . map ( apiExample => ( {
83
+ const apis = RNTesterList . APIs . map ( ( apiExample ) : RNTesterModuleInfo => ( {
82
84
...apiExample ,
83
85
isBookmarked : bookmarks . apis . includes ( apiExample . key ) ,
84
86
exampleType : Screens . APIS ,
You can’t perform that action at this time.
0 commit comments