-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresolve-context.ts
More file actions
38 lines (33 loc) · 883 Bytes
/
resolve-context.ts
File metadata and controls
38 lines (33 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* @file Hooks - ResolveHookContext
* @module esm-types/hooks/ResolveHookContext
*/
import type { ImportAssertions } from '#src/interfaces'
import type { FileUrl } from '#src/types'
/**
* [`resolve`][1] hook context.
*
* [1]: https://nodejs.org/api/esm.html#resolvespecifier-context-nextresolve
*/
interface ResolveHookContext {
/**
* Export conditions of relevant `package.json`.
*
* @see https://nodejs.org/api/packages.html#conditional-exports
*/
conditions: string[]
/**
* Import assertions map.
*
* @see {@linkcode ImportAssertions}
*/
importAssertions: ImportAssertions
/**
* URL of module importing the specifier to be resolved, or `undefined` if
* the module specifier is the Node.js entry point.
*
* @see {@linkcode FileUrl}
*/
parentURL?: FileUrl | undefined
}
export type { ResolveHookContext as default }