@@ -122,6 +122,7 @@ fn parse_node_with_inner_parse<'a>(node: Node<'a>, context: &mut Context<'a>, in
122122 Node :: Constructor ( node) => parse_constructor ( node, context) ,
123123 Node :: Decorator ( node) => parse_decorator ( node, context) ,
124124 Node :: TsParamProp ( node) => parse_parameter_prop ( node, context) ,
125+ Node :: PrivateMethod ( node) => parse_private_method ( node, context) ,
125126 Node :: PrivateName ( node) => parse_private_name ( node, context) ,
126127 Node :: PrivateProp ( node) => parse_private_prop ( node, context) ,
127128 /* clauses */
@@ -383,6 +384,26 @@ fn parse_node_with_inner_parse<'a>(node: Node<'a>, context: &mut Context<'a>, in
383384/* class */
384385
385386fn parse_class_method < ' a > ( node : & ' a ClassMethod , context : & mut Context < ' a > ) -> PrintItems {
387+ // todo: consolidate with private method
388+ return parse_class_or_object_method ( ClassOrObjectMethod {
389+ parameters_span_data : node. get_parameters_span_data ( context) ,
390+ decorators : Some ( & node. function . decorators ) ,
391+ accessibility : node. accessibility ,
392+ is_static : node. is_static ,
393+ is_async : node. function . is_async ,
394+ is_abstract : node. is_abstract ,
395+ kind : node. kind . into ( ) ,
396+ is_generator : node. function . is_generator ,
397+ is_optional : node. is_optional ,
398+ key : ( & node. key ) . into ( ) ,
399+ type_params : node. function . type_params . as_ref ( ) . map ( |x| x. into ( ) ) ,
400+ params : node. function . params . iter ( ) . map ( |x| x. into ( ) ) . collect ( ) ,
401+ return_type : node. function . return_type . as_ref ( ) . map ( |x| x. into ( ) ) ,
402+ body : node. function . body . as_ref ( ) . map ( |x| x. into ( ) ) ,
403+ } , context) ;
404+ }
405+
406+ fn parse_private_method < ' a > ( node : & ' a PrivateMethod , context : & mut Context < ' a > ) -> PrintItems {
386407 return parse_class_or_object_method ( ClassOrObjectMethod {
387408 parameters_span_data : node. get_parameters_span_data ( context) ,
388409 decorators : Some ( & node. function . decorators ) ,
0 commit comments