-
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): add TUtilEach, TUtilMap, TUtilSet types
feat(types): add TUtilEach, TUtilMap, TUtilSet types
- Loading branch information
1 parent
60da7d2
commit deab615
Showing
7 changed files
with
80 additions
and
4 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,8 @@ | ||
export type TUtilEachCollection = any[] | object | ||
|
||
export type TUtilEachHandler = (value: any, key?: string | number, collection?: TUtilEachCollection) => void | ||
|
||
export type TUtilEach = ( | ||
collection: TUtilEachCollection, | ||
handler: TUtilEachHandler | ||
) => TUtilEachCollection |
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,8 @@ | ||
export type TUtilMapCollection = any[] | object | ||
|
||
export type TUtilMapHandler = (value: any, key?: string | number, collection?: TUtilMapCollection) => any | ||
|
||
export type TUtilMap = ( | ||
collection: TUtilMapCollection, | ||
handler: TUtilMapHandler | ||
) => any[] |
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,11 @@ | ||
export type TUtilSetPath = Array<string | number> | string | ||
|
||
export type TUtilSetObject = object | ||
|
||
export type TUtilSetValue = any | ||
|
||
export type TUtilSet = ( | ||
obj: TUtilSetObject, | ||
path: TUtilSetPath, | ||
value: TUtilSetValue | ||
) => void |
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