source: trip-planner-front/node_modules/@babel/core/src/transform-file-browser.ts@ 6a3a178

Last change on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 716 bytes
Line 
1// duplicated from transform-file so we do not have to import anything here
2type TransformFile = {
3 (filename: string, callback: Function): void;
4 (filename: string, opts: any, callback: Function): void;
5};
6
7export const transformFile: TransformFile = function transformFile(
8 filename,
9 opts,
10 callback?,
11) {
12 if (typeof opts === "function") {
13 callback = opts;
14 }
15
16 callback(new Error("Transforming files is not supported in browsers"), null);
17};
18
19export function transformFileSync(): never {
20 throw new Error("Transforming files is not supported in browsers");
21}
22
23export function transformFileAsync() {
24 return Promise.reject(
25 new Error("Transforming files is not supported in browsers"),
26 );
27}
Note: See TracBrowser for help on using the repository browser.