Skip to content

Commit

Permalink
!fixup: add (tmp) type for node:module.registerHook
Browse files Browse the repository at this point in the history
Until available in `@types/node`
  • Loading branch information
JakobJingleheimer committed Feb 27, 2025
1 parent 4109f2f commit d89434c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions recipes/correct-ts-specifiers/src/nodejs.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { ResolveHook, LoadHook } from 'node:module';

declare module "module" {
namespace Module {
function registerHooks(hooks: {
resolve?: ResolveHook,
load?: LoadHook,
}): ModuleHooks;

class ModuleHooks {
constructor(resolve?: ResolveHook, load?: LoadHook);
deregister(): void;
}
}
}

0 comments on commit d89434c

Please sign in to comment.