We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b853ca4 commit 34f6026Copy full SHA for 34f6026
src/utils.ts
@@ -2,7 +2,7 @@ import { fileURLToPath as _fileURLToPath } from "node:url";
2
import { promises as fsp } from "node:fs";
3
import { normalizeSlash, BUILTIN_MODULES } from "./_utils";
4
5
-export function fileURLToPath(id: string): string {
+export function fileURLToPath(id: string | URL): string {
6
if (typeof id === "string" && !id.startsWith("file://")) {
7
return normalizeSlash(id);
8
}
0 commit comments