File tree Expand file tree Collapse file tree 3 files changed +36
-0
lines changed
Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * @file Unit Tests - Engine
3+ * @module pkg-types/types/tests/Engine
4+ */
5+
6+ import type TestSubject from '../engine'
7+
8+ describe ( 'unit:types/Engine' , ( ) => {
9+ it ( 'should allow "node"' , ( ) => {
10+ assertType < TestSubject > ( 'node' )
11+ } )
12+
13+ it ( 'should allow "npm"' , ( ) => {
14+ assertType < TestSubject > ( 'npm' )
15+ } )
16+
17+ it ( 'should allow "yarn"' , ( ) => {
18+ assertType < TestSubject > ( 'yarn' )
19+ } )
20+ } )
Original file line number Diff line number Diff line change 1+ /**
2+ * @file Type Definitions - Engine
3+ * @module pkg-types/types/Engine
4+ */
5+
6+ import type { LiteralUnion } from '@flex-development/tutils'
7+
8+ /**
9+ * Engines a package runs on.
10+ *
11+ * @see https://docs.npmjs.com/cli/configuring-npm/package-json#engines
12+ */
13+ type Engine = LiteralUnion < 'node' | 'npm' | 'yarn' , string >
14+
15+ export type { Engine as default }
Original file line number Diff line number Diff line change 55
66export type { default as Access } from './access'
77export type { default as CPU } from './cpu'
8+ export type { default as Engine } from './engine'
89export type { default as HoistingLimits } from './hoisiting-limits'
910export type { default as Type } from './type'
1011export type { default as TypesVersions } from './types-versions'
You can’t perform that action at this time.
0 commit comments