-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Lexus Drumgold <[email protected]>
- Loading branch information
1 parent
e6e4cd5
commit a6b42c7
Showing
3 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/** | ||
* @file Unit Tests - OS | ||
* @module pkg-types/types/tests/OS | ||
*/ | ||
|
||
import type TestSubject from '../os' | ||
|
||
describe('unit:types/OS', () => { | ||
it('should allow "aix"', () => { | ||
assertType<TestSubject>('aix') | ||
}) | ||
|
||
it('should allow "darwin"', () => { | ||
assertType<TestSubject>('darwin') | ||
}) | ||
|
||
it('should allow "freebsd"', () => { | ||
assertType<TestSubject>('freebsd') | ||
}) | ||
|
||
it('should allow "linux"', () => { | ||
assertType<TestSubject>('linux') | ||
}) | ||
|
||
it('should allow "openbsd"', () => { | ||
assertType<TestSubject>('openbsd') | ||
}) | ||
|
||
it('should allow "sunos"', () => { | ||
assertType<TestSubject>('sunos') | ||
}) | ||
|
||
it('should allow "ppc64"', () => { | ||
assertType<TestSubject>('ppc64') | ||
}) | ||
|
||
it('should allow "win32"', () => { | ||
assertType<TestSubject>('win32') | ||
}) | ||
|
||
it('should allow "!aix"', () => { | ||
assertType<TestSubject>('!aix') | ||
}) | ||
|
||
it('should allow "!darwin"', () => { | ||
assertType<TestSubject>('!darwin') | ||
}) | ||
|
||
it('should allow "!freebsd"', () => { | ||
assertType<TestSubject>('!freebsd') | ||
}) | ||
|
||
it('should allow "!linux"', () => { | ||
assertType<TestSubject>('!linux') | ||
}) | ||
|
||
it('should allow "!openbsd"', () => { | ||
assertType<TestSubject>('!openbsd') | ||
}) | ||
|
||
it('should allow "!sunos"', () => { | ||
assertType<TestSubject>('!sunos') | ||
}) | ||
|
||
it('should allow "!ppc64"', () => { | ||
assertType<TestSubject>('!ppc64') | ||
}) | ||
|
||
it('should allow "!win32"', () => { | ||
assertType<TestSubject>('!win32') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* @file Type Definitions - OS | ||
* @module pkg-types/types/OS | ||
*/ | ||
|
||
import type { EmptyString, LiteralUnion } from '@flex-development/tutils' | ||
|
||
/** | ||
* Operating system platforms a package runs on. | ||
* | ||
* @see https://docs.npmjs.com/cli/configuring-npm/package-json#os | ||
* @see https://yarnpkg.com/configuration/manifest#os | ||
*/ | ||
type OS = LiteralUnion< | ||
| `${EmptyString | '!'}aix` | ||
| `${EmptyString | '!'}darwin` | ||
| `${EmptyString | '!'}freebsd` | ||
| `${EmptyString | '!'}linux` | ||
| `${EmptyString | '!'}openbsd` | ||
| `${EmptyString | '!'}sunos` | ||
| `${EmptyString | '!'}win32`, | ||
string | ||
> | ||
|
||
export type { OS as default } |