File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export type Options = {
27
27
internals ?: boolean
28
28
}
29
29
30
- declare class Hook {
30
+ export declare class Hook {
31
31
/**
32
32
* Creates a hook to be run on any already loaded modules and any that will
33
33
* be loaded in the future. It will be run once per loaded module. If
Original file line number Diff line number Diff line change 1
1
import assert from 'node:assert/strict'
2
- import { addHook } from '../../index.js'
2
+ import defaultHook , { Hook , addHook } from '../../index.js'
3
3
import { sayHi } from '../fixtures/say-hi.mjs'
4
4
5
5
addHook ( ( url , exported ) => {
@@ -8,4 +8,12 @@ addHook((url, exported) => {
8
8
}
9
9
} )
10
10
11
- assert . equal ( sayHi ( 'test' ) , 'Hooked' )
11
+ new defaultHook ( ( exported : any , name : string , baseDir : string | void ) => {
12
+
13
+ } ) ;
14
+
15
+ new Hook ( ( exported : any , name : string , baseDir : string | void ) => {
16
+
17
+ } ) ;
18
+
19
+ assert . equal ( sayHi ( 'test' ) , 'Hooked' )
You can’t perform that action at this time.
0 commit comments