File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -243,6 +243,7 @@ export default function (userOptions: TSGenOptions) {
243243 function visit_content_type (
244244 contentType : ContentstackTypes . ContentType | ContentstackTypes . GlobalField
245245 ) {
246+ modularBlockInterfaces . clear ( ) ;
246247 const contentTypeInterface = [
247248 options . docgen . interface ( contentType . description ) ,
248249 define_interface ( contentType , options . systemFields ) ,
@@ -257,18 +258,6 @@ export default function (userOptions: TSGenOptions) {
257258
258259 return [ ...modularBlockInterfaces , contentTypeInterface ] . join ( '\n\n' ) ;
259260 }
260-
261- function visit_modular_block (
262- field : ContentstackTypes . Field ,
263- block : ContentstackTypes . Block
264- ) {
265- return (
266- '{' +
267- [ block . uid + ':' , block . reference_to ? name_type ( block . reference_to as string ) + ';' : '{' + visit_fields ( block . schema || [ ] ) + '};' ] . join ( ' ' ) +
268- visit_block_names ( field , block ) +
269- '}'
270- )
271- }
272261
273262 function type_modular_blocks ( field : ContentstackTypes . Field ) : string {
274263 const blockInterfaceName = name_type ( field . uid ) ;
You can’t perform that action at this time.
0 commit comments