File tree Expand file tree Collapse file tree 3 files changed +47
-0
lines changed
Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * @file Unit Tests - Person
3+ * @module pkg-types/interfaces/tests/Person
4+ */
5+
6+ import pkg from '../../../package.json' assert { type : 'json' }
7+ import type TestSubject from '../person'
8+
9+ describe ( 'unit:interfaces/Person' , ( ) => {
10+ it ( 'should allow object that only has property "name"' , ( ) => {
11+ assertType < TestSubject > ( { name : pkg . author . name } )
12+ } )
13+
14+ it ( 'should allow object with all properties' , ( ) => {
15+ assertType < Required < TestSubject > > ( {
16+ ...pkg . author ,
17+ email : 'unicornware@flexdevelopment.llc'
18+ } )
19+ } )
20+ } )
Original file line number Diff line number Diff line change @@ -9,5 +9,6 @@ export type { default as FundingObject } from './funding-object'
99export type { default as InstallConfig } from './install-config'
1010export type { default as LicenseObject } from './license-object'
1111export type { default as PeerDependencyMeta } from './peer-dependency-meta'
12+ export type { default as Person } from './person'
1213export type { default as PublishConfig } from './publish-config'
1314export type { default as WorkspacesConfig } from './workspaces-config'
Original file line number Diff line number Diff line change 1+ /**
2+ * @file Interfaces - Person
3+ * @module pkg-types/interfaces/Person
4+ */
5+
6+ /**
7+ * Someone who has been involved in creating or maintaining a package.
8+ */
9+ interface Person {
10+ /**
11+ * Person's email address.
12+ */
13+ email ?: string
14+
15+ /**
16+ * Person's name.
17+ */
18+ name : string
19+
20+ /**
21+ * Person's URL.
22+ */
23+ url ?: string
24+ }
25+
26+ export type { Person as default }
You can’t perform that action at this time.
0 commit comments