MCPcopy
hub / github.com/lingodotdev/lingo.dev / parseJSX

Function parseJSX

packages/compiler/src/utils/jsx-element.spec.ts:8–13  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

6import { generate } from "../babel-interop";
7
8function parseJSX(code: string): t.File {
9 return parse(code, {
10 sourceType: "module",
11 plugins: ["jsx", "typescript"],
12 });
13}
14
15function getJSXElementPath(code: string): NodePath<t.JSXElement> {
16 const ast = parseJSX(code);

Callers 1

getJSXElementPathFunction · 0.70

Calls 1

parseFunction · 0.85

Tested by

no test coverage detected