diff --git a/crates/oxc_ast/src/ast/ts.rs b/crates/oxc_ast/src/ast/ts.rs index 6c70e2aeed823..a20b54f31aadd 100644 --- a/crates/oxc_ast/src/ast/ts.rs +++ b/crates/oxc_ast/src/ast/ts.rs @@ -1132,7 +1132,7 @@ pub struct TSImportType<'a> { pub is_type_of: bool, // `typeof import("foo")` pub parameter: TSType<'a>, pub qualifier: Option>, - pub attributes: Option>, + pub attributes: Option>>, pub type_parameters: Option>>, } diff --git a/crates/oxc_ast/src/generated/assert_layouts.rs b/crates/oxc_ast/src/generated/assert_layouts.rs index 3511e0d07d914..049f15187c37b 100644 --- a/crates/oxc_ast/src/generated/assert_layouts.rs +++ b/crates/oxc_ast/src/generated/assert_layouts.rs @@ -1134,14 +1134,14 @@ const _: () = { assert!(size_of::() == 16usize); assert!(align_of::() == 8usize); - assert!(size_of::() == 120usize); + assert!(size_of::() == 64usize); assert!(align_of::() == 8usize); assert!(offset_of!(TSImportType, span) == 0usize); assert!(offset_of!(TSImportType, is_type_of) == 8usize); assert!(offset_of!(TSImportType, parameter) == 16usize); assert!(offset_of!(TSImportType, qualifier) == 32usize); assert!(offset_of!(TSImportType, attributes) == 48usize); - assert!(offset_of!(TSImportType, type_parameters) == 112usize); + assert!(offset_of!(TSImportType, type_parameters) == 56usize); assert!(size_of::() == 64usize); assert!(align_of::() == 8usize); @@ -2689,14 +2689,14 @@ const _: () = { assert!(size_of::() == 8usize); assert!(align_of::() == 4usize); - assert!(size_of::() == 72usize); + assert!(size_of::() == 36usize); assert!(align_of::() == 4usize); assert!(offset_of!(TSImportType, span) == 0usize); assert!(offset_of!(TSImportType, is_type_of) == 8usize); assert!(offset_of!(TSImportType, parameter) == 12usize); assert!(offset_of!(TSImportType, qualifier) == 20usize); assert!(offset_of!(TSImportType, attributes) == 28usize); - assert!(offset_of!(TSImportType, type_parameters) == 68usize); + assert!(offset_of!(TSImportType, type_parameters) == 32usize); assert!(size_of::() == 40usize); assert!(align_of::() == 4usize); diff --git a/crates/oxc_ast/src/generated/ast_builder.rs b/crates/oxc_ast/src/generated/ast_builder.rs index 88b6b6a36edd1..e159f7db0cfe0 100644 --- a/crates/oxc_ast/src/generated/ast_builder.rs +++ b/crates/oxc_ast/src/generated/ast_builder.rs @@ -8845,17 +8845,18 @@ impl<'a> AstBuilder<'a> { /// - attributes /// - type_parameters #[inline] - pub fn ts_type_import_type( + pub fn ts_type_import_type( self, span: Span, is_type_of: bool, parameter: TSType<'a>, qualifier: Option>, - attributes: Option>, - type_parameters: T1, + attributes: T1, + type_parameters: T2, ) -> TSType<'a> where - T1: IntoIn<'a, Option>>>, + T1: IntoIn<'a, Option>>>, + T2: IntoIn<'a, Option>>>, { TSType::TSImportType(self.alloc(self.ts_import_type( span, @@ -11696,17 +11697,18 @@ impl<'a> AstBuilder<'a> { /// - attributes /// - type_parameters #[inline] - pub fn ts_type_query_expr_name_import_type( + pub fn ts_type_query_expr_name_import_type( self, span: Span, is_type_of: bool, parameter: TSType<'a>, qualifier: Option>, - attributes: Option>, - type_parameters: T1, + attributes: T1, + type_parameters: T2, ) -> TSTypeQueryExprName<'a> where - T1: IntoIn<'a, Option>>>, + T1: IntoIn<'a, Option>>>, + T2: IntoIn<'a, Option>>>, { TSTypeQueryExprName::TSImportType(self.alloc(self.ts_import_type( span, @@ -11747,24 +11749,25 @@ impl<'a> AstBuilder<'a> { /// - attributes /// - type_parameters #[inline] - pub fn ts_import_type( + pub fn ts_import_type( self, span: Span, is_type_of: bool, parameter: TSType<'a>, qualifier: Option>, - attributes: Option>, - type_parameters: T1, + attributes: T1, + type_parameters: T2, ) -> TSImportType<'a> where - T1: IntoIn<'a, Option>>>, + T1: IntoIn<'a, Option>>>, + T2: IntoIn<'a, Option>>>, { TSImportType { span, is_type_of, parameter, qualifier, - attributes, + attributes: attributes.into_in(self.allocator), type_parameters: type_parameters.into_in(self.allocator), } } @@ -11781,17 +11784,18 @@ impl<'a> AstBuilder<'a> { /// - attributes /// - type_parameters #[inline] - pub fn alloc_ts_import_type( + pub fn alloc_ts_import_type( self, span: Span, is_type_of: bool, parameter: TSType<'a>, qualifier: Option>, - attributes: Option>, - type_parameters: T1, + attributes: T1, + type_parameters: T2, ) -> Box<'a, TSImportType<'a>> where - T1: IntoIn<'a, Option>>>, + T1: IntoIn<'a, Option>>>, + T2: IntoIn<'a, Option>>>, { Box::new_in( self.ts_import_type( diff --git a/crates/oxc_traverse/src/generated/ancestor.rs b/crates/oxc_traverse/src/generated/ancestor.rs index 20c55e0d69f50..0dbe693eb8e5e 100644 --- a/crates/oxc_traverse/src/generated/ancestor.rs +++ b/crates/oxc_traverse/src/generated/ancestor.rs @@ -11914,10 +11914,10 @@ impl<'a, 't> TSImportTypeWithoutParameter<'a, 't> { } #[inline] - pub fn attributes(self) -> &'t Option> { + pub fn attributes(self) -> &'t Option>> { unsafe { &*((self.0 as *const u8).add(OFFSET_TS_IMPORT_TYPE_ATTRIBUTES) - as *const Option>) + as *const Option>>) } } @@ -11956,10 +11956,10 @@ impl<'a, 't> TSImportTypeWithoutQualifier<'a, 't> { } #[inline] - pub fn attributes(self) -> &'t Option> { + pub fn attributes(self) -> &'t Option>> { unsafe { &*((self.0 as *const u8).add(OFFSET_TS_IMPORT_TYPE_ATTRIBUTES) - as *const Option>) + as *const Option>>) } } @@ -12048,10 +12048,10 @@ impl<'a, 't> TSImportTypeWithoutTypeParameters<'a, 't> { } #[inline] - pub fn attributes(self) -> &'t Option> { + pub fn attributes(self) -> &'t Option>> { unsafe { &*((self.0 as *const u8).add(OFFSET_TS_IMPORT_TYPE_ATTRIBUTES) - as *const Option>) + as *const Option>>) } } } diff --git a/crates/oxc_traverse/src/generated/walk.rs b/crates/oxc_traverse/src/generated/walk.rs index f612c5de5acb4..775af069fbc36 100644 --- a/crates/oxc_traverse/src/generated/walk.rs +++ b/crates/oxc_traverse/src/generated/walk.rs @@ -5139,10 +5139,10 @@ pub(crate) unsafe fn walk_ts_import_type<'a, Tr: Traverse<'a>>( walk_ts_type_name(traverser, field as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8).add(ancestor::OFFSET_TS_IMPORT_TYPE_ATTRIBUTES) - as *mut Option) + as *mut Option>) { ctx.retag_stack(AncestorType::TSImportTypeAttributes); - walk_ts_import_attributes(traverser, field as *mut _, ctx); + walk_ts_import_attributes(traverser, (&mut **field) as *mut _, ctx); } if let Some(field) = &mut *((node as *mut u8) .add(ancestor::OFFSET_TS_IMPORT_TYPE_TYPE_PARAMETERS)