Skip to content

Commit

Permalink
feat(types): Access
Browse files Browse the repository at this point in the history
Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
  • Loading branch information
unicornware committed Nov 30, 2022
1 parent 3661d84 commit 6b08cbf
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/types/__tests__/access.spec-d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* @file Unit Tests - Access
* @module pkg-types/types/tests/Access
*/

import type TestSubject from '../access'

describe('unit:types/Access', () => {
it('should allow "public"', () => {
assertType<TestSubject>('public')
})

it('should allow "restricted"', () => {
assertType<TestSubject>('restricted')
})
})
13 changes: 13 additions & 0 deletions src/types/access.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* @file Type Definitions - Access
* @module pkg-types/types/Access
*/

/**
* Package access levels.
*
* @see https://yarnpkg.com/configuration/manifest#publishConfig.access
*/
type Access = 'public' | 'restricted'

export type { Access as default }
1 change: 1 addition & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
* @module tsconfig-types/types
*/

export type { default as Access } from './access'
export type { default as HoistingLimits } from './hoisiting-limits'
export type { default as TypesVersions } from './types-versions'

0 comments on commit 6b08cbf

Please sign in to comment.