66
77# Function: useComponentCollector()
88
9- > ** useComponentCollector** (` context ` , ` hint ` , ` options ` ): ` object `
9+ > ** useComponentCollector** (` context ` , ` hint ` , ` options ` ): [ ` ReturnType ` ] ( ../namespaces/useComponentCollector/type-aliases/ReturnType.md )
1010
1111Get a ctx and listeners for the rule to collect function components
1212
@@ -26,98 +26,12 @@ The hint to use
2626
2727### options
2828
29- [ ` ComponentCollectorOptions ` ] ( ../interfaces/ComponentCollectorOptions .md ) = ` {} `
29+ [ ` Options ` ] ( ../namespaces/useComponentCollector/type-aliases/Options .md ) = ` {} `
3030
3131The options to use
3232
3333## Returns
3434
35- ` object `
35+ [ ` ReturnType ` ] ( ../namespaces/useComponentCollector/type-aliases/ReturnType.md )
3636
3737The component collector
38-
39- ### ctx
40-
41- > ** ctx** : ` object `
42-
43- #### ctx.getCurrentEntry()
44-
45- > ** getCurrentEntry** : () => ` undefined ` \| \{ ` hookCalls ` : ` CallExpression ` [ ] ; ` isComponent ` : ` boolean ` ; ` key ` : ` string ` ; ` node ` : ` TSESTreeFunction ` ; \}
46-
47- ##### Returns
48-
49- ` undefined ` \| \{ ` hookCalls ` : ` CallExpression ` [ ] ; ` isComponent ` : ` boolean ` ; ` key ` : ` string ` ; ` node ` : ` TSESTreeFunction ` ; \}
50-
51- #### ctx.getAllComponents()
52-
53- ##### Parameters
54-
55- ###### node
56-
57- ` Program `
58-
59- ##### Returns
60-
61- ` Map ` \< ` string ` , [ ` ERFunctionComponent ` ] ( ../interfaces/ERFunctionComponent.md ) \>
62-
63- #### ctx.getCurrentEntries()
64-
65- ##### Returns
66-
67- ` object ` [ ]
68-
69- ### listeners
70-
71- > ** listeners** : ` object `
72-
73- #### listeners.: function \[ type\] ()
74-
75- > ` readonly ` ** : function \[ type\] ** : (` node ` ) => ` void ` = ` onFunctionEnter `
76-
77- ##### Parameters
78-
79- ###### node
80-
81- ` TSESTreeFunction `
82-
83- ##### Returns
84-
85- ` void `
86-
87- #### listeners.: function \[ type\] : exit ()
88-
89- > ` readonly ` ** : function \[ type\] : exit ** : () => ` undefined ` \| \{ ` hookCalls ` : ` CallExpression ` [ ] ; ` isComponent ` : ` boolean ` ; ` key ` : ` string ` ; ` node ` : ` TSESTreeFunction ` ; \} = ` onFunctionExit `
90-
91- ##### Returns
92-
93- ` undefined ` \| \{ ` hookCalls ` : ` CallExpression ` [ ] ; ` isComponent ` : ` boolean ` ; ` key ` : ` string ` ; ` node ` : ` TSESTreeFunction ` ; \}
94-
95- #### listeners.ArrowFunctionExpression\[ type\]\[ body.type!='BlockStatement'\] ()
96-
97- ##### Returns
98-
99- ` void `
100-
101- #### listeners.CallExpression\[ type\] : exit ()?
102-
103- ##### Parameters
104-
105- ###### node
106-
107- ` CallExpression `
108-
109- ##### Returns
110-
111- ` void `
112-
113- #### listeners.ReturnStatement\[ type\] ()
114-
115- ##### Parameters
116-
117- ###### node
118-
119- ` ReturnStatement `
120-
121- ##### Returns
122-
123- ` void `
0 commit comments