Skip to content

Commit

Permalink
Merge pull request #602 from spleekz/master
Browse files Browse the repository at this point in the history
$mol_type_nullable: null intersection with type or object properties
  • Loading branch information
nin-jin committed Jun 20, 2023
2 parents 8343893 + f4c055e commit 41bfbc3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions type/nullable/nullable.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace $ {

export type $mol_type_nullable< T > = T extends object ?
{ [ Key in keyof T ]: T[ Key ] | null }
: T | null

}

0 comments on commit 41bfbc3

Please sign in to comment.