UNPKG

716 BPlain TextView Raw
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}