File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ export default class $Refs<S extends JSONSchema = JSONSchema> {
3131 *
3232 * @param types (optional) Optionally only return certain types of paths ("file", "http", etc.)
3333 */
34- paths ( ...types : string [ ] ) : string [ ] {
35- const paths = getPaths ( this . _$refs , types ) ;
34+ paths ( ...types : ( string | string [ ] ) [ ] ) : string [ ] {
35+ const paths = getPaths ( this . _$refs , types . flat ( ) ) ;
3636 return paths . map ( ( path ) => {
3737 return convertPathToPosix ( path . decoded ) ;
3838 } ) ;
@@ -45,9 +45,9 @@ export default class $Refs<S extends JSONSchema = JSONSchema> {
4545 *
4646 * @param types (optional) Optionally only return values from certain locations ("file", "http", etc.)
4747 */
48- values ( ...types : string [ ] ) : S {
48+ values ( ...types : ( string | string [ ] ) [ ] ) : S {
4949 const $refs = this . _$refs ;
50- const paths = getPaths ( $refs , types ) ;
50+ const paths = getPaths ( $refs , types . flat ( ) ) ;
5151 return paths . reduce < Record < string , any > > ( ( obj , path ) => {
5252 obj [ convertPathToPosix ( path . decoded ) ] = $refs [ path . encoded ] . value ;
5353 return obj ;
You can’t perform that action at this time.
0 commit comments