diff --git a/sphinx_js/renderers.py b/sphinx_js/renderers.py index b0d3338b..6ba5c168 100644 --- a/sphinx_js/renderers.py +++ b/sphinx_js/renderers.py @@ -211,7 +211,6 @@ def _return_formatter(self, return_: Return) -> tuple[list[str], str]: tail += return_.description return ["returns"], tail - def _type_param_formatter(self, tparam: TypeParam) -> tuple[list[str], str] | None: v = tparam.name if tparam.extends: @@ -219,7 +218,6 @@ def _type_param_formatter(self, tparam: TypeParam) -> tuple[list[str], str] | No heads = ["typeparam", v] return heads, tparam.description - def _param_formatter(self, param: Param) -> tuple[list[str], str] | None: """Derive heads and tail from ``@param`` blocks.""" if not param.type and not param.description: @@ -232,7 +230,6 @@ def _param_formatter(self, param: Param) -> tuple[list[str], str] | None: tail = param.description return heads, tail - def _param_type_formatter(self, param: Param) -> tuple[list[str], str] | None: """Generate types for function parameters specified in field.""" if not param.type: @@ -241,7 +238,6 @@ def _param_type_formatter(self, param: Param) -> tuple[list[str], str] | None: tail = rst.escape(param.type) return heads, tail - def _exception_formatter(self, exception: Exc) -> tuple[list[str], str]: """Derive heads and tail from ``@throws`` blocks.""" heads = ["throws"] @@ -250,7 +246,6 @@ def _exception_formatter(self, exception: Exc) -> tuple[list[str], str]: tail = exception.description return heads, tail - def _fields(self, obj: TopLevel) -> Iterator[tuple[list[str], str]]: """Return an iterable of "info fields" to be included in the directive, like params, return values, and exceptions. diff --git a/sphinx_js/typedoc.py b/sphinx_js/typedoc.py index 7932a227..f52ff5a7 100644 --- a/sphinx_js/typedoc.py +++ b/sphinx_js/typedoc.py @@ -946,8 +946,16 @@ def _render_name_root(self, converter: Converter) -> str: return self.operator + " " + self.target.render_name(converter) +class IntrinsicType(TypeBase): + type: Literal["intrinsic"] + name: str + + def _render_name_root(self, converter: Converter) -> str: + return self.name + + class ReferenceType(TypeBase): - type: Literal["reference", "intrinsic"] + type: Literal["reference"] name: str id: int | None target: Any @@ -1022,6 +1030,7 @@ def _render_name_root(self, converter: Converter) -> str: | LiteralType | OtherType | OperatorType + | IntrinsicType | ReferenceType | ReflectionType | TupleType