4
4
* @constructor
5
5
*/
6
6
declare class RefResolver {
7
-
8
7
/**
9
8
* @param {object } opts - Options for the resolver.
10
9
* @param {boolean } opts.allowEqualDuplicates - Whether to allow schemas with equal ids to be added to the resolver.
11
10
*/
12
- constructor ( opts ?: { allowEqualDuplicates ?: boolean } ) ;
11
+ constructor ( opts ?: { allowEqualDuplicates ?: boolean } )
13
12
14
13
/**
15
14
* Adds the given schema to the resolver.
16
15
* @param {any } schema - The schema to be added.
17
16
* @param {string } schemaId - The default schema id of the schema to be added.
18
17
*/
19
- addSchema ( schema : any , schemaId ?: string ) : void ;
18
+ addSchema ( schema : any , schemaId ?: string ) : void
20
19
21
20
/**
22
21
* Returns the schema by the given schema id and jsonPointer.
@@ -25,34 +24,34 @@ declare class RefResolver {
25
24
* @param {string } jsonPointer - The jsonPointer of the schema to be returned.
26
25
* @returns {any | null } The schema by the given schema id and jsonPointer.
27
26
*/
28
- getSchema ( schemaId : string , jsonPointer ?: string ) : any | null ;
27
+ getSchema ( schemaId : string , jsonPointer ?: string ) : any | null
29
28
30
29
/**
31
30
* Returns true if the schema by the given schema id is added to the resolver.
32
31
* @param {string } schemaId - The schema id of the schema to be checked.
33
32
* @returns {boolean } True if the schema by the given schema id is added to the resolver.
34
33
*/
35
- hasSchema ( schemaId : string ) : boolean ;
34
+ hasSchema ( schemaId : string ) : boolean
36
35
37
36
/**
38
37
* Returns the schema references of the schema by the given schema id.
39
38
* @param {string } schemaId - The schema id of the schema whose references are to be returned.
40
39
* @returns {Array<{ schemaId: string; jsonPointer: string }> } The schema references of the schema by the given schema id.
41
40
*/
42
- getSchemaRefs ( schemaId : string ) : { schemaId : string ; jsonPointer : string } [ ] ;
41
+ getSchemaRefs ( schemaId : string ) : { schemaId : string ; jsonPointer : string } [ ]
43
42
44
43
/**
45
44
* Returns all the schema dependencies of the schema by the given schema id.
46
45
* @param {string } schemaId - The schema id of the schema whose dependencies are to be returned.
47
46
* @returns {object } The schema dependencies of the schema by the given schema id.
48
47
*/
49
- getSchemaDependencies ( schemaId : string ) : { [ key : string ] : any } ;
48
+ getSchemaDependencies ( schemaId : string ) : { [ key : string ] : any }
50
49
51
50
/**
52
51
* Dereferences the schema by the given schema id.
53
52
* @param {string } schemaId - The schema id of the schema to be dereferenced.
54
53
*/
55
- derefSchema ( schemaId : string ) : void ;
54
+ derefSchema ( schemaId : string ) : void
56
55
57
56
/**
58
57
* Returns the dereferenced schema by the given schema id and jsonPointer.
@@ -62,7 +61,7 @@ declare class RefResolver {
62
61
* @param {string } jsonPointer - The jsonPointer of the schema to be returned.
63
62
* @returns {any | null } The dereferenced schema by the given schema id and jsonPointer.
64
63
*/
65
- getDerefSchema ( schemaId : string , jsonPointer ?: string ) : any | null ;
64
+ getDerefSchema ( schemaId : string , jsonPointer ?: string ) : any | null
66
65
}
67
66
68
- export { RefResolver } ;
67
+ export { RefResolver }
0 commit comments