Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync execution TS definitions with Flow.
Specifically: Create jsutils/Path.d.ts and pull some utility funcs out to there Add typeResolver options
- Loading branch information
1 parent
37161b2
commit 7d9ad14
Showing
4 changed files
with
59 additions
and
41 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
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,14 @@ | ||
export type Path = { | ||
prev: Path | void; | ||
key: string | number; | ||
}; | ||
|
||
/** | ||
* Given a Path and a key, return a new Path containing the new key. | ||
*/ | ||
export function addPath(prev: Path | undefined, key: string | number): Path; | ||
|
||
/** | ||
* Given a Path, return an Array of the path keys. | ||
*/ | ||
export function pathToArray(path: Path): Array<string | number>; |