| 79 | |
| 80 | module.exports = class ResolverFactory { |
| 81 | constructor() { |
| 82 | this.hooks = Object.freeze({ |
| 83 | /** @type {HookMap<SyncWaterfallHook<[ResolveOptionsWithDependencyType]>>} */ |
| 84 | resolveOptions: new HookMap( |
| 85 | () => new SyncWaterfallHook(["resolveOptions"]) |
| 86 | ), |
| 87 | /** @type {HookMap<SyncHook<[Resolver, ResolveOptions, ResolveOptionsWithDependencyType]>>} */ |
| 88 | resolver: new HookMap( |
| 89 | () => new SyncHook(["resolver", "resolveOptions", "userResolveOptions"]) |
| 90 | ) |
| 91 | }); |
| 92 | /** @type {Map<string, ResolverCache>} */ |
| 93 | this.cache = new Map(); |
| 94 | } |
| 95 | |
| 96 | /** |
| 97 | * Returns the resolver. |