File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -238,6 +238,7 @@ export default function (userOptions: TSGenOptions) {
238238 function visit_content_type (
239239 contentType : ContentstackTypes . ContentType | ContentstackTypes . GlobalField
240240 ) {
241+ modularBlockInterfaces . clear ( ) ;
241242 const contentTypeInterface = [
242243 options . docgen . interface ( contentType . description ) ,
243244 define_interface ( contentType , options . systemFields ) ,
@@ -252,18 +253,6 @@ export default function (userOptions: TSGenOptions) {
252253
253254 return [ ...modularBlockInterfaces , contentTypeInterface ] . join ( '\n\n' ) ;
254255 }
255-
256- function visit_modular_block (
257- field : ContentstackTypes . Field ,
258- block : ContentstackTypes . Block
259- ) {
260- return (
261- '{' +
262- [ block . uid + ':' , block . reference_to ? name_type ( block . reference_to as string ) + ';' : '{' + visit_fields ( block . schema || [ ] ) + '};' ] . join ( ' ' ) +
263- visit_block_names ( field , block ) +
264- '}'
265- )
266- }
267256
268257 function type_modular_blocks ( field : ContentstackTypes . Field ) : string {
269258 const blockInterfaceName = name_type ( field . uid ) ;
You can’t perform that action at this time.
0 commit comments