@@ -9,7 +9,10 @@ def extract_type_info(type_str: str) -> Dict[str, Any]:
99
1010 This function parses the input type string to determine if it represents a
1111 union of types, a generic/template type with parameters, or a simple type. It
12- returns a dictionary containing the parsed type information.
12+ returns a dictionary containing the parsed type information. The function
13+ handles union types by splitting the string on the pipe ('|') character and
14+ processes generics/templates by matching the pattern 'name<params>' while
15+ accounting for nested generics using bracket counting.
1316
1417 Args:
1518 type_str (str): The type string from a JSDoc tag.
@@ -133,9 +136,11 @@ def remove_jsdoc_component(jsdoc_obj: Dict[str, Any], component_type: str, ident
133136 """Remove a specified component from a JSDoc object.
134137
135138 This function modifies the provided JSDoc object by removing a component based
136- on the given type and identifier. If no identifier is provided, it removes all
137- instances of the component type. The function handles various component types
138- such as 'description', 'param', 'returns', 'throws', 'example', and 'tag'.
139+ on the given type and identifier. If no identifier is provided, it removes all
140+ instances of the component type. The function handles various component types
141+ such as 'description', 'param', 'returns', 'throws', 'example', and 'tag'. It
142+ processes each component type accordingly, ensuring that the JSDoc object
143+ remains consistent after modification.
139144
140145 Args:
141146 jsdoc_obj (Dict[str, Any]): The JSDoc object to be modified.
0 commit comments