@@ -7,7 +7,7 @@ import httpResolver from "./resolvers/http.js";
7
7
8
8
import type { HTTPResolverOptions , JSONSchemaObject , Plugin , ResolverOptions } from "./types/index.js" ;
9
9
10
- type DeepPartial < T > = T extends object
10
+ export type DeepPartial < T > = T extends object
11
11
? {
12
12
[ P in keyof T ] ?: DeepPartial < T [ P ] > ;
13
13
}
@@ -18,7 +18,7 @@ type DeepPartial<T> = T extends object
18
18
* @param [options] - Overridden options
19
19
* @class
20
20
*/
21
- interface $RefParserOptions {
21
+ export interface $RefParserOptions {
22
22
/**
23
23
* The `parse` options determine how different types of files will be parsed.
24
24
*
@@ -101,7 +101,7 @@ interface $RefParserOptions {
101
101
} ;
102
102
}
103
103
104
- const getDefaults = ( ) => {
104
+ export const getJsonSchemaRefParserDefaultOptions = ( ) => {
105
105
const defaults = {
106
106
/**
107
107
* Determines how different types of files will be parsed.
@@ -172,8 +172,8 @@ const getDefaults = () => {
172
172
return defaults ;
173
173
} ;
174
174
175
- export const getNewOptions = ( options : DeepPartial < $RefParserOptions > ) : $RefParserOptions => {
176
- const newOptions = getDefaults ( ) ;
175
+ export const getNewOptions = ( options : DeepPartial < $RefParserOptions > | undefined ) : $RefParserOptions => {
176
+ const newOptions = getJsonSchemaRefParserDefaultOptions ( ) ;
177
177
if ( options ) {
178
178
merge ( newOptions , options ) ;
179
179
}
0 commit comments