| | |
| | | |
| | | /** @typedef {WebpackResolveOptions & { dependencyType?: string, resolveToContext?: boolean }} ResolveOptionsWithDependencyType */ |
| | | /** |
| | | * Defines the with options type used by this module. |
| | | * @typedef {object} WithOptions |
| | | * @property {(options: Partial<ResolveOptionsWithDependencyType>) => ResolverWithOptions} withOptions create a resolver with additional/different options |
| | | */ |
| | |
| | | const EMPTY_RESOLVE_OPTIONS = {}; |
| | | |
| | | /** |
| | | * Convert to resolve options. |
| | | * @param {ResolveOptionsWithDependencyType} resolveOptionsWithDepType enhanced options |
| | | * @returns {ResolveOptions} merged options |
| | | */ |
| | |
| | | }; |
| | | |
| | | /** |
| | | * Represents the resolver factory runtime component. |
| | | * @typedef {object} ResolverCache |
| | | * @property {WeakMap<ResolveOptionsWithDependencyType, ResolverWithOptions>} direct |
| | | * @property {Map<string, ResolverWithOptions>} stringified |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns the resolver. |
| | | * @param {string} type type of resolver |
| | | * @param {ResolveOptionsWithDependencyType=} resolveOptions options |
| | | * @returns {ResolverWithOptions} the resolver |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns the resolver. |
| | | * @param {string} type type of resolver |
| | | * @param {ResolveOptionsWithDependencyType} resolveOptionsWithDepType options |
| | | * @returns {ResolverWithOptions} the resolver |