MCPcopy Create free account
hub / github.com/donghaxkim/react-rewrite / getParser

Function getParser

packages/cli/src/transform.ts:8–11  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

6import { logger } from "./logger.js";
7
8export function getParser(filePath: string): string {
9 const ext = path.extname(filePath);
10 return ext === ".tsx" || ext === ".ts" ? "tsx" : "babel";
11}
12
13// ── I/O-free helpers (used by both single-op wrappers and batch engine) ──
14

Callers 2

parseSourceFunction · 0.85
getSiblingsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected