-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(types):
OrNil
, OrNull
, OrUndefined
- Loading branch information
1 parent
2ae7467
commit 23ea43e
Showing
4 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type NIL from './nil.type' | ||
|
||
/** | ||
* @file Type Definitions - OrNil | ||
* @module tutils/types/OrNil | ||
*/ | ||
|
||
/** | ||
* Type representing a value that also be `NIL`. | ||
* | ||
* @template T - Value type | ||
*/ | ||
type OrNil<T> = T | NIL | ||
|
||
export default OrNil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* @file Type Definitions - OrNull | ||
* @module tutils/types/OrNull | ||
*/ | ||
|
||
/** | ||
* Type representing a value that also be `null`. | ||
* | ||
* @template T - Value type | ||
*/ | ||
type OrNull<T> = T | null | ||
|
||
export default OrNull |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* @file Type Definitions - OrUndefined | ||
* @module tutils/types/OrUndefined | ||
*/ | ||
|
||
/** | ||
* Type representing a value that also be `undefined`. | ||
* | ||
* @template T - Value type | ||
*/ | ||
type OrUndefined<T> = T | undefined | ||
|
||
export default OrUndefined |