mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-28 18:08:15 +03:00
11 lines
280 B
TypeScript
11 lines
280 B
TypeScript
import nodeFetch from "node-fetch";
|
|
|
|
const fetch =
|
|
process.env.NODE_ENV === "test"
|
|
? () => {
|
|
throw new Error("Cannot use real fetch inside testing env!");
|
|
}
|
|
: nodeFetch;
|
|
|
|
export default (fetch as unknown) as typeof nodeFetch;
|