@@ -13,7 +13,7 @@ export class SchemaComponentsMap {
13
13
this . _data = [ ] ;
14
14
}
15
15
16
- createRef = ( paths : string [ ] ) : string => {
16
+ createRef = ( paths : string [ ] ) => {
17
17
if ( ! Array . isArray ( paths ) ) {
18
18
throw new Error ( `Expected an array, but received: ${ typeof paths } ` ) ;
19
19
}
@@ -23,7 +23,7 @@ export class SchemaComponentsMap {
23
23
return [ "#" , ...paths ] . join ( "/" ) ;
24
24
} ;
25
25
26
- parseRef = ( ref : string ) : string [ ] => {
26
+ parseRef = ( ref : string ) => {
27
27
if ( ! ref . startsWith ( "#/" ) ) {
28
28
throw new Error ( `Invalid ref format: ${ ref } . It should start with "#/"` ) ;
29
29
}
@@ -32,7 +32,7 @@ export class SchemaComponentsMap {
32
32
33
33
createComponent (
34
34
$ref : string ,
35
- rawTypeData : SchemaComponent [ "rawTypeData" ]
35
+ rawTypeData : SchemaComponent [ "rawTypeData" ] ,
36
36
) : SchemaComponent {
37
37
const parsed = this . parseRef ( $ref ) ;
38
38
const typeName = parsed [ parsed . length - 1 ] ! ;
@@ -69,8 +69,8 @@ export class SchemaComponentsMap {
69
69
filter ( ...componentNames : ( string [ ] | string ) [ ] ) {
70
70
return this . _data . filter ( ( it ) =>
71
71
componentNames . some ( ( componentName ) =>
72
- it . $ref . startsWith ( `#/components/${ componentName } ` )
73
- )
72
+ it . $ref . startsWith ( `#/components/${ componentName } ` ) ,
73
+ ) ,
74
74
) ;
75
75
}
76
76
0 commit comments