diff --git a/sphinx_js/typedoc.py b/sphinx_js/typedoc.py index 9ed14531..4a850185 100644 --- a/sphinx_js/typedoc.py +++ b/sphinx_js/typedoc.py @@ -1165,9 +1165,10 @@ class PredicateType(TypeBase): targetType: "TypeD" def _render_name_root(self, converter: Converter) -> Iterator[str | ir.TypeXRef]: - yield self.name - yield " is " + yield ir.TypeXRefIntrinsic("boolean") + yield " (typeguard for " yield from self.targetType.render_name(converter) + yield ")" AnyNode = Node | Project | Signature diff --git a/tests/test_build_ts/test_build_ts.py b/tests/test_build_ts/test_build_ts.py index 6ef5d560..d94be374 100644 --- a/tests/test_build_ts/test_build_ts.py +++ b/tests/test_build_ts/test_build_ts.py @@ -185,7 +185,7 @@ def test_predicate(self): * **c** (any) -- Returns: - c is "ConstructorlessClass()" + boolean (typeguard for "ConstructorlessClass()") """ ), )