Skip to content

Commit

Permalink
fixed typescript issue
Browse files Browse the repository at this point in the history
  • Loading branch information
synapse committed Mar 22, 2024
1 parent fd06b94 commit 6e816f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ expectAssignable<Function>(deepmerge({ symbols: true }))
expectType<string>(deepmerge()('string', { a: 'string' }).a)
expectType<string>(deepmerge()(1, { a: 'string' }).a)

expectType<string>(deepmerge()({ a: 'string' }, 'string'))
expectType<number>(deepmerge()({ a: 'string' }, 1))
expectType<string>(deepmerge()<Object, string>({ a: 'string' }, 'string'))
expectType<number>(deepmerge()<Object, number>({ a: 'string' }, 1))
expectType<Date>(deepmerge()({ a: 'string' }, new Date()))
expectType<RegExp>(deepmerge()({ a: 'string' }, /a/g))
expectType<{}>(deepmerge()(/a/, {}))
Expand Down

0 comments on commit 6e816f5

Please sign in to comment.