MCPcopy Create free account
hub / github.com/tomchentw/react-google-maps / txClassMethods

Function txClassMethods

src/tx/MapChild.js:179–207  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

177 }
178
179 function txClassMethods() {
180 return [
181 ...publicMethods.map(({ name, returns, returnsDesc }) => {
182 return Object.assign(
183 j.classMethod(
184 "method",
185 j.identifier(name),
186 [],
187 j.blockStatement([
188 j.returnStatement(
189 j.callExpression(
190 j.identifier(`${getInstanceFromComponent}.${name}`),
191 []
192 )
193 ),
194 ])
195 ),
196 {
197 comments: [
198 j.commentBlock(
199 `*\n * ${returnsDesc}\n * @type ${returns}\n * @public \n `,
200 true
201 ),
202 ],
203 }
204 )
205 }),
206 ]
207 }
208
209 function eventMap() {
210 return [

Callers 1

transformerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected