Commit f5150fd 1 parent a315dd0 commit f5150fd Copy full SHA for f5150fd
File tree 4 files changed +63
-0
lines changed
4 files changed +63
-0
lines changed Original file line number Diff line number Diff line change 22
22
"{@linkcode PackageJson}" : " https://github.com/flex-development/pkg-types/blob/2.0.0/src/interfaces/package-json.ts" ,
23
23
"{@linkcode PackageScope}" : " /api/interfaces/#packagescope" ,
24
24
"{@linkcode ParseModuleIdOptions}" : " /api/interfaces/#parsemoduleidoptions" ,
25
+ "{@linkcode ParseSubpathOptions}" : " /api/interfaces/#parsesubpathoptions" ,
25
26
"{@linkcode ParsedModuleId}" : " /api/interfaces/#parsedmoduleid" ,
26
27
"{@linkcode Protocol}" : " /api/types#protocol" ,
27
28
"{@linkcode RESOLVE_EXTENSIONS}" : " /api/#resolve-extensions" ,
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @file Type Tests - ParseSubpathOptions
3
+ * @module mlly/interfaces/tests/unit-d/ParseSubpathOptions
4
+ */
5
+
6
+ import type { ModuleId } from '#src/types'
7
+ import type TestSubject from '../options-parse-subpath'
8
+
9
+ describe ( 'unit-d:interfaces/ParseSubpathOptions' , ( ) => {
10
+ it ( 'should match [dir: ModuleId]' , ( ) => {
11
+ expectTypeOf < TestSubject > ( ) . toHaveProperty ( 'dir' ) . toEqualTypeOf < ModuleId > ( )
12
+ } )
13
+
14
+ it ( 'should match [internal?: boolean]' , ( ) => {
15
+ expectTypeOf < TestSubject > ( )
16
+ . toHaveProperty ( 'internal' )
17
+ . toEqualTypeOf < boolean | undefined > ( )
18
+ } )
19
+
20
+ it ( 'should match [parent: ModuleId]' , ( ) => {
21
+ expectTypeOf < TestSubject > ( )
22
+ . toHaveProperty ( 'parent' )
23
+ . toEqualTypeOf < ModuleId > ( )
24
+ } )
25
+ } )
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ export type { default as StaticImport } from './import-static'
9
9
export type { default as GetFormatOptions } from './options-get-format'
10
10
export type { default as GetSourceOptions } from './options-get-source'
11
11
export type { default as ParseModuleIdOptions } from './options-parse-module-id'
12
+ export type { default as ParseSubpathOptions } from './options-parse-subpath'
12
13
export type { default as ResolveOptions } from './options-resolve'
13
14
export type { default as ResolveAliasOptions } from './options-resolve-alias'
14
15
export type { default as PackageScope } from './package-scope'
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @file Interfaces - ParseSubpathOptions
3
+ * @module mlly/interfaces/ParseSubpathOptions
4
+ */
5
+
6
+ import type { ModuleId } from '#src/types'
7
+
8
+ /**
9
+ * Subpath parsing options.
10
+ *
11
+ * @see {@linkcode ModuleId }
12
+ */
13
+ interface ParseSubpathOptions {
14
+ /**
15
+ * URL of directory containing relevant `package.json` file.
16
+ */
17
+ dir : ModuleId
18
+
19
+ /**
20
+ * Package [`imports`][1] hint.
21
+ *
22
+ * [1]: https://nodejs.org/api/packages.html#imports
23
+ *
24
+ * @default specifier.startsWith('#')
25
+ */
26
+ internal ?: boolean | undefined
27
+
28
+ /**
29
+ * URL of module to resolve from.
30
+ *
31
+ * **Note**: Used for error reporting only.
32
+ */
33
+ parent : ModuleId
34
+ }
35
+
36
+ export type { ParseSubpathOptions as default }
You can’t perform that action at this time.
0 commit comments