Skip to content

Commit 980fe79

Browse files
committed
feat: add types for representors
1 parent f217bd7 commit 980fe79

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

types/index.d.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
export type JSONPointer = string;
2+
export type URIFragmentJSONPointer = string;
3+
export type StringifiedJSONPointer = string;
24
export type ReferenceToken = string;
35
export type EscapedReferenceToken = string;
46
export type UnescapedReferenceToken = string;
@@ -60,6 +62,19 @@ export type JSONObject = Record<string, any>;
6062

6163
export function evaluate(value: JSONArray | JSONObject, jsonPointer: JSONPointer, options?: EvaluationOptions): unknown;
6264

65+
/**
66+
* Representing
67+
*/
68+
export interface JSONString {
69+
to(jsonPointer: JSONPointer): StringifiedJSONPointer;
70+
from(jsonPointer: StringifiedJSONPointer): JSONPointer
71+
}
72+
73+
export interface URIFragmentIdentifier {
74+
to(jsonPointer: JSONPointer): URIFragmentJSONPointer;
75+
from(jsonPointer: URIFragmentJSONPointer): JSONPointer
76+
}
77+
6378
/**
6479
* Grammar
6580
*/

0 commit comments

Comments
 (0)