Commit 52c16ad 1 parent feda82b commit 52c16ad Copy full SHA for 52c16ad
File tree 4 files changed +48
-0
lines changed
4 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 9
9
"{@linkcode ExportStatement}" : " /api/interfaces#exportstatement" ,
10
10
"{@linkcode Ext}" : " https://github.com/flex-development/pathe/blob/main/src/types/ext.ts" ,
11
11
"{@linkcode ImportStatement}" : " /api/interfaces#importstatement" ,
12
+ "{@linkcode PackageJson}" : " https://github.com/flex-development/pkg-types/blob/2.0.0/src/interfaces/package-json.ts" ,
13
+ "{@linkcode PackageScope}" : " /api/interfaces/#packagescope" ,
12
14
"{@linkcode MIMEType}" : " /api/types#mimetype" ,
13
15
"{@linkcode ModuleSpecifierType}" : " /api/types#modulespecifiertype" ,
14
16
"{@linkcode RESOLVE_EXTENSIONS}" : " /api/constants#resolve-extensions" ,
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @file Type Tests - PackageScope
3
+ * @module mlly/interfaces/tests/unit-d/PackageScope
4
+ */
5
+
6
+ import type { PackageJson } from '@flex-development/pkg-types'
7
+ import type TestSubject from '../package-scope'
8
+
9
+ describe ( 'unit-d:interfaces/PackageScope' , ( ) => {
10
+ it ( 'should match [dir: string]' , ( ) => {
11
+ expectTypeOf < TestSubject > ( ) . toHaveProperty ( 'dir' ) . toBeString ( )
12
+ } )
13
+
14
+ it ( 'should match [pkg: PackageJson]' , ( ) => {
15
+ expectTypeOf < TestSubject > ( )
16
+ . toHaveProperty ( 'pkg' )
17
+ . toEqualTypeOf < PackageJson > ( )
18
+ } )
19
+ } )
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ export type { default as DynamicImport } from './import-dynamic'
7
7
export type { default as StaticImport } from './import-static'
8
8
export type { default as ResolveOptions } from './options-resolve'
9
9
export type { default as ResolveAliasOptions } from './options-resolve-alias'
10
+ export type { default as PackageScope } from './package-scope'
10
11
export type { default as Statement } from './statement'
11
12
export type { default as ExportStatement } from './statement-export'
12
13
export type { default as ImportStatement } from './statement-import'
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @file Interfaces - PackageScope
3
+ * @module mlly/interfaces/PackageScope
4
+ */
5
+
6
+ import type { PackageJson } from '@flex-development/pkg-types'
7
+
8
+ /**
9
+ * Object containing a `package.json` object and an absolute path to a directory
10
+ * containing a `package.json` file.
11
+ *
12
+ * @see {@linkcode PackageJson }
13
+ */
14
+ interface PackageScope {
15
+ /**
16
+ * Absolute path to directory containing `package.json` file.
17
+ */
18
+ dir : string
19
+
20
+ /**
21
+ * `package.json` object.
22
+ */
23
+ pkg : PackageJson
24
+ }
25
+
26
+ export type { PackageScope as default }
You can’t perform that action at this time.
0 commit comments