Last change
on this file since e29cc2e 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
|
---|
2 | type TransformFile = {
|
---|
3 | (filename: string, callback: Function): void;
|
---|
4 | (filename: string, opts: any, callback: Function): void;
|
---|
5 | };
|
---|
6 |
|
---|
7 | export 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 |
|
---|
19 | export function transformFileSync(): never {
|
---|
20 | throw new Error("Transforming files is not supported in browsers");
|
---|
21 | }
|
---|
22 |
|
---|
23 | export 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.