MCPcopy Create free account
hub / github.com/babel/babel / pre

Function pre

packages/babel-plugin-transform-react-inline-elements/src/index.ts:30–38  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

28 );
29 },
30 pre(state) {
31 const tagName = state.tagName;
32 const args = state.args;
33 if (t.react.isCompatTag(tagName)) {
34 args.push(t.stringLiteral(tagName!));
35 } else {
36 args.push(state.tagExpr);
37 }
38 },
39 post(state, pass) {
40 state.callee = pass.addHelper("jsx");
41 // NOTE: The arguments passed to the "jsx" helper are:

Callers

nothing calls this directly

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected