@@ -12485,6 +12485,45 @@ impl<'a> AstBuilder<'a> {
1248512485 ) )
1248612486 }
1248712487
12488+ /// Build a [`TSSignature::TSCallSignatureDeclaration`] with `scope_id`.
12489+ ///
12490+ /// This node contains a [`TSCallSignatureDeclaration`] that will be stored in the memory arena.
12491+ ///
12492+ /// ## Parameters
12493+ /// * `span`: The [`Span`] covering this node
12494+ /// * `type_parameters`
12495+ /// * `this_param`
12496+ /// * `params`
12497+ /// * `return_type`
12498+ /// * `scope_id`
12499+ #[ inline]
12500+ pub fn ts_signature_call_signature_declaration_with_scope_id < T1 , T2 , T3 , T4 > (
12501+ self ,
12502+ span : Span ,
12503+ type_parameters : T1 ,
12504+ this_param : T2 ,
12505+ params : T3 ,
12506+ return_type : T4 ,
12507+ scope_id : ScopeId ,
12508+ ) -> TSSignature < ' a >
12509+ where
12510+ T1 : IntoIn < ' a , Option < Box < ' a , TSTypeParameterDeclaration < ' a > > > > ,
12511+ T2 : IntoIn < ' a , Option < Box < ' a , TSThisParameter < ' a > > > > ,
12512+ T3 : IntoIn < ' a , Box < ' a , FormalParameters < ' a > > > ,
12513+ T4 : IntoIn < ' a , Option < Box < ' a , TSTypeAnnotation < ' a > > > > ,
12514+ {
12515+ TSSignature :: TSCallSignatureDeclaration (
12516+ self . alloc_ts_call_signature_declaration_with_scope_id (
12517+ span,
12518+ type_parameters,
12519+ this_param,
12520+ params,
12521+ return_type,
12522+ scope_id,
12523+ ) ,
12524+ )
12525+ }
12526+
1248812527 /// Build a [`TSSignature::TSConstructSignatureDeclaration`].
1248912528 ///
1249012529 /// This node contains a [`TSConstructSignatureDeclaration`] that will be stored in the memory arena.
@@ -12738,6 +12777,7 @@ impl<'a> AstBuilder<'a> {
1273812777 this_param : this_param. into_in ( self . allocator ) ,
1273912778 params : params. into_in ( self . allocator ) ,
1274012779 return_type : return_type. into_in ( self . allocator ) ,
12780+ scope_id : Default :: default ( ) ,
1274112781 }
1274212782 }
1274312783
@@ -12779,6 +12819,85 @@ impl<'a> AstBuilder<'a> {
1277912819 )
1278012820 }
1278112821
12822+ /// Build a [`TSCallSignatureDeclaration`] with `scope_id`.
12823+ ///
12824+ /// If you want the built node to be allocated in the memory arena,
12825+ /// use [`AstBuilder::alloc_ts_call_signature_declaration_with_scope_id`] instead.
12826+ ///
12827+ /// ## Parameters
12828+ /// * `span`: The [`Span`] covering this node
12829+ /// * `type_parameters`
12830+ /// * `this_param`
12831+ /// * `params`
12832+ /// * `return_type`
12833+ /// * `scope_id`
12834+ #[ inline]
12835+ pub fn ts_call_signature_declaration_with_scope_id < T1 , T2 , T3 , T4 > (
12836+ self ,
12837+ span : Span ,
12838+ type_parameters : T1 ,
12839+ this_param : T2 ,
12840+ params : T3 ,
12841+ return_type : T4 ,
12842+ scope_id : ScopeId ,
12843+ ) -> TSCallSignatureDeclaration < ' a >
12844+ where
12845+ T1 : IntoIn < ' a , Option < Box < ' a , TSTypeParameterDeclaration < ' a > > > > ,
12846+ T2 : IntoIn < ' a , Option < Box < ' a , TSThisParameter < ' a > > > > ,
12847+ T3 : IntoIn < ' a , Box < ' a , FormalParameters < ' a > > > ,
12848+ T4 : IntoIn < ' a , Option < Box < ' a , TSTypeAnnotation < ' a > > > > ,
12849+ {
12850+ TSCallSignatureDeclaration {
12851+ span,
12852+ type_parameters : type_parameters. into_in ( self . allocator ) ,
12853+ this_param : this_param. into_in ( self . allocator ) ,
12854+ params : params. into_in ( self . allocator ) ,
12855+ return_type : return_type. into_in ( self . allocator ) ,
12856+ scope_id : Cell :: new ( Some ( scope_id) ) ,
12857+ }
12858+ }
12859+
12860+ /// Build a [`TSCallSignatureDeclaration`] with `scope_id`, and store it in the memory arena.
12861+ ///
12862+ /// Returns a [`Box`] containing the newly-allocated node.
12863+ /// If you want a stack-allocated node, use [`AstBuilder::ts_call_signature_declaration_with_scope_id`] instead.
12864+ ///
12865+ /// ## Parameters
12866+ /// * `span`: The [`Span`] covering this node
12867+ /// * `type_parameters`
12868+ /// * `this_param`
12869+ /// * `params`
12870+ /// * `return_type`
12871+ /// * `scope_id`
12872+ #[ inline]
12873+ pub fn alloc_ts_call_signature_declaration_with_scope_id < T1 , T2 , T3 , T4 > (
12874+ self ,
12875+ span : Span ,
12876+ type_parameters : T1 ,
12877+ this_param : T2 ,
12878+ params : T3 ,
12879+ return_type : T4 ,
12880+ scope_id : ScopeId ,
12881+ ) -> Box < ' a , TSCallSignatureDeclaration < ' a > >
12882+ where
12883+ T1 : IntoIn < ' a , Option < Box < ' a , TSTypeParameterDeclaration < ' a > > > > ,
12884+ T2 : IntoIn < ' a , Option < Box < ' a , TSThisParameter < ' a > > > > ,
12885+ T3 : IntoIn < ' a , Box < ' a , FormalParameters < ' a > > > ,
12886+ T4 : IntoIn < ' a , Option < Box < ' a , TSTypeAnnotation < ' a > > > > ,
12887+ {
12888+ Box :: new_in (
12889+ self . ts_call_signature_declaration_with_scope_id (
12890+ span,
12891+ type_parameters,
12892+ this_param,
12893+ params,
12894+ return_type,
12895+ scope_id,
12896+ ) ,
12897+ self . allocator ,
12898+ )
12899+ }
12900+
1278212901 /// Build a [`TSMethodSignature`].
1278312902 ///
1278412903 /// If you want the built node to be allocated in the memory arena,
0 commit comments