Skip to content

Commit

Permalink
feat: NullableNumber
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgroshkov committed Mar 11, 2024
1 parent 36a4fa3 commit 7a93ab3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,17 @@ export type NumberOfMilliseconds = number
*/
export type Integer = number

/**
* Convenience type alias, that allows to write this:
*
* data: NullableNumber[]
*
* instead of this:
*
* data: (number | null)[]
*/
export type NullableNumber = number | null

/**
* Used as a compact representation of truthy value.
* undefined ('' or other short falsy value) should be used as falsy value.
Expand Down

0 comments on commit 7a93ab3

Please sign in to comment.