From cad34dd9dc36022eb8aeb2b27c5645bccc759bb3 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Fri, 22 Sep 2023 18:40:57 -0700 Subject: [PATCH] MAINT Separate InstrinsicType into a separate class from ReferenceType --- sphinx_js/typedoc.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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