forked from graphql/graphql-js
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Specifically: Add `extensions` field in lots of places Reorder fields Both this and graphql#2106 add Path.d.ts, but they're the same. If theres a merge conflict, just pick one.
- Loading branch information
Jackson Kearl
committed
Aug 23, 2019
1 parent
7b389be
commit 1bb35bb
Showing
8 changed files
with
97 additions
and
42 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
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>; |
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
Oops, something went wrong.