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

Function transformFile

packages/babel-core/src/transform-file-browser.ts:13–23  ·  view source on GitHub ↗
(
  filename,
  opts,
  callback?: (error: Error, file: null) => void,
)

Source from the content-addressed store, hash-verified

11};
12
13export const transformFile: TransformFile = function transformFile(
14 filename,
15 opts,
16 callback?: (error: Error, file: null) => void,
17) {
18 if (typeof opts === "function") {
19 callback = opts;
20 }
21
22 callback!(new Error("Transforming files is not supported in browsers"), null);
23};
24
25export function transformFileSync(): never {
26 throw new Error("Transforming files is not supported in browsers");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected