File tree Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -240,6 +240,7 @@ function stripeTypeScriptInternalTypesSchema (type: any): any {
240
240
if ( ! type ) {
241
241
return type
242
242
}
243
+
243
244
if ( type . declarations && type . declarations . find ( ( d : any ) => d . file . includes ( 'node_modules/typescript' ) ) ) {
244
245
return false
245
246
}
@@ -248,28 +249,17 @@ function stripeTypeScriptInternalTypesSchema (type: any): any {
248
249
return type . map ( ( sch : any ) => stripeTypeScriptInternalTypesSchema ( sch ) ) . filter ( r => r !== false )
249
250
}
250
251
251
- if ( ! type . schema ) {
252
- return type
253
- }
254
-
255
- if ( type . schema . schema ) {
256
- const res = stripeTypeScriptInternalTypesSchema ( type . schema )
252
+ if ( Array . isArray ( type . schema ) ) {
257
253
return {
258
254
...type ,
259
- schema : res
255
+ schema : type . schema . map ( ( sch : any ) => stripeTypeScriptInternalTypesSchema ( sch ) ) . filter ( ( r : any ) => r !== false )
260
256
}
261
257
}
262
258
263
- if ( typeof type . schema !== 'object' ) {
259
+ if ( ! type . schema || typeof type . schema !== 'object' ) {
264
260
return type
265
261
}
266
262
267
- if ( Array . isArray ( type . schema ) ) {
268
- return type . schema
269
- . map ( ( sch : any ) => stripeTypeScriptInternalTypesSchema ( sch ) )
270
- . filter ( ( r : any ) => r !== false )
271
- }
272
-
273
263
const schema : any = { }
274
264
Object . keys ( type . schema ) . forEach ( ( sch ) => {
275
265
const res = stripeTypeScriptInternalTypesSchema ( type . schema [ sch ] )
You can’t perform that action at this time.
0 commit comments