@@ -7,7 +7,7 @@ import httpResolver from "./resolvers/http.js";
77
88import type { HTTPResolverOptions , JSONSchemaObject , Plugin , ResolverOptions } from "./types/index.js" ;
99
10- type DeepPartial < T > = T extends object
10+ export type DeepPartial < T > = T extends object
1111 ? {
1212 [ P in keyof T ] ?: DeepPartial < T [ P ] > ;
1313 }
@@ -18,7 +18,7 @@ type DeepPartial<T> = T extends object
1818 * @param [options] - Overridden options
1919 * @class
2020 */
21- interface $RefParserOptions {
21+ export interface $RefParserOptions {
2222 /**
2323 * The `parse` options determine how different types of files will be parsed.
2424 *
@@ -101,7 +101,7 @@ interface $RefParserOptions {
101101 } ;
102102}
103103
104- const getDefaults = ( ) => {
104+ export const getJsonSchemaRefParserDefaultOptions = ( ) => {
105105 const defaults = {
106106 /**
107107 * Determines how different types of files will be parsed.
@@ -172,8 +172,8 @@ const getDefaults = () => {
172172 return defaults ;
173173} ;
174174
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 ( ) ;
177177 if ( options ) {
178178 merge ( newOptions , options ) ;
179179 }
0 commit comments