Skip to content

Commit

Permalink
chore: fix type issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jan 24, 2025
1 parent 2308b2f commit a8c662f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/runtime/node/module/$cloudflare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import { notImplemented } from "../../_internal/utils";
const workerdModule = process.getBuiltinModule("node:module");

export const createRequire: typeof nodeModule.createRequire = (
file: string,
file: string | URL,
) => {
return Object.assign(workerdModule.createRequire(file), {
resolve: Object.assign(notImplemented("module.require.resolve"), {
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/node/module/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const _extensions = {
".node": notImplemented("module.require.extensions['.node']"),
};

export const createRequire = function (filename: string) {
export const createRequire = function (_filename: string | URL) {
return Object.assign(notImplemented("module.require"), {
resolve: Object.assign(notImplemented("module.require.resolve"), {
paths: notImplemented("module.require.resolve.paths"),
Expand All @@ -27,7 +27,7 @@ export const getCompileCacheDir: typeof nodeModule.getCompileCacheDir =
};

export const enableCompileCache: typeof nodeModule.enableCompileCache =
function (caheDir: string) {
function (_cacheDir?: string) {
return {
status: 0 /* compileCacheStatus.FAILED */,
message: "not implemented",
Expand Down

0 comments on commit a8c662f

Please sign in to comment.