Skip to content

Commit

Permalink
(feat): Add Maybe and Prettify types
Browse files Browse the repository at this point in the history
  • Loading branch information
victory-sokolov committed Mar 7, 2024
1 parent 9948dba commit be45fa4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,12 @@ export type NonNegativeInteger<T extends number> = number extends T
: `${T}` extends `-${string}` | `${string}.${string}`
? never
: T;

export type Maybe<T> = T | null;

/**
* Prettify nested objects
*/
export type Prettify<T> = {
[K in keyof T]: T[K];
} & object;

0 comments on commit be45fa4

Please sign in to comment.