-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: integration kind by category function to return at least one ele…
…ment
- Loading branch information
1 parent
653d2e4
commit ba63f27
Showing
4 changed files
with
17 additions
and
11 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
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 |
---|---|---|
@@ -1 +1,7 @@ | ||
export type MaybePromise<T> = T | Promise<T>; | ||
export type MaybePromise<T> = T | Promise<T>; | ||
|
||
export type IsUnion<T, U extends T = T> = (T extends unknown ? (U extends T ? false : true) : never) extends false | ||
? false | ||
: true; | ||
|
||
export type UnionArrayWithAtLeastOneElement<T> = IsUnion<T> extends true ? [T, ...T[]] : [T]; |
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