File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -253,22 +253,23 @@ function stripeTypeScriptInternalTypesSchema (type: any): any {
253
253
if ( Array . isArray ( type . schema ) ) {
254
254
return {
255
255
...type ,
256
+ declarations : undefined ,
256
257
schema : type . schema . map ( ( sch : any ) => stripeTypeScriptInternalTypesSchema ( sch ) ) . filter ( ( r : any ) => r !== false )
257
258
}
258
259
}
259
260
260
261
if ( ! type . schema || typeof type . schema !== 'object' ) {
261
- return type
262
+ return typeof type === 'object' ? { ... type , declarations : undefined } : type
262
263
}
263
264
264
265
const schema : any = { }
265
266
Object . keys ( type . schema ) . forEach ( ( sch ) => {
266
267
if ( sch === 'schema' && type . schema [ sch ] ) {
267
268
schema [ sch ] = schema [ sch ] || { }
268
269
Object . keys ( type . schema [ sch ] ) . forEach ( ( sch2 ) => {
269
- const res = stripeTypeScriptInternalTypesSchema ( type . schema [ sch ] [ sch2 ] ) ;
270
+ const res = stripeTypeScriptInternalTypesSchema ( type . schema [ sch ] [ sch2 ] )
270
271
if ( res !== false ) {
271
- schema [ sch ] [ sch2 ] = res ;
272
+ schema [ sch ] [ sch2 ] = res
272
273
}
273
274
} )
274
275
return
@@ -282,6 +283,7 @@ function stripeTypeScriptInternalTypesSchema (type: any): any {
282
283
283
284
return {
284
285
...type ,
286
+ declarations : undefined ,
285
287
schema
286
288
}
287
289
}
You can’t perform that action at this time.
0 commit comments