source: imaps-frontend/node_modules/@babel/core/src/transform-file-browser.ts

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 3 months ago

Update repo after prototype presentation

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