Skip to content

Commit

Permalink
feat: [ConditionMap] add "ts-node"
Browse files Browse the repository at this point in the history
Signed-off-by: Lexus Drumgold <[email protected]>
  • Loading branch information
unicornware committed Sep 1, 2024
1 parent 8930666 commit 0c70854
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/__tests__/condition-map.spec-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ describe('unit-d:ConditionMap', () => {
.toEqualTypeOf<'require'>()
})

it('should match [tsNode: "ts-node"]', () => {
expectTypeOf<TestSubject>()
.toHaveProperty('tsNode')
.toEqualTypeOf<'ts-node'>()
})

it('should match [types: "types"]', () => {
expectTypeOf<TestSubject>().toHaveProperty('types').toEqualTypeOf<'types'>()
})
Expand Down
3 changes: 2 additions & 1 deletion src/condition-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ interface ConditionMap {
development: 'development'
electron: 'electron'
import: 'import'
nodeAddons: 'node-addons'
node: 'node'
nodeAddons: 'node-addons'
production: 'production'
reactNative: 'react-native'
require: 'require'
tsNode: 'ts-node'
types: 'types'
}

Expand Down

0 comments on commit 0c70854

Please sign in to comment.