# rendering.TypeAliasRenderer

The presentation of a PEP 695 type alias, with its type parameters and value

Usage

[Source](https://github.com/posit-dev/great-docs/blob/main/great_docs/_apiref/_rendering/type_aliases.py#L30-L133)

``` python
rendering.TypeAliasRenderer(
    node,
    level=1,
    contained=False,
    page_path=None,
    display_name_format="doc",
    signature_name_format="doc",
    *,
    renderers=_default_renderers(),
    extension=_default_extension(),
    context_page_path=None,
    _purpose=_RenderingPurpose.OBJECT,
)
```

The description shows the subject, then the declaration in source form, without a Usage row. A generic alias renders its `Type Parameters` section even though it is not callable.

## Parameter Attributes

`node: (     APIReference     | content.DocClass     | content.DocFunction     | content.DocAttribute     | content.DocTypeAlias     | content.DocModule     | content.Page     | content.Section )`  
The node being documented

`level: int = 1`  
The heading depth of this appearance

`contained: bool = False`  
Whether this object is documented inside another object's documentation

A contained member's summary row links to its heading on the same page, and its [context](../reference/great_docs.rendering.ObjectRenderer.context.md) reports the containing page.

`page_path: str | None = None`  
The page that this object's summary row links to

API pages supply a path relative to the reference directory. `None` links within the current page, and contained members always link to a local anchor. For the containing page relative to the output directory, use `context.page_path`.

`display_name_format: DisplayNameFormat = "doc"`  
Format for the display name

`signature_name_format: DisplayNameFormat = "doc"`  
Format for the signature name

`renderers: Renderers = _default_renderers()`  
Renderer choices shared with nested objects, pages and summaries

`extension: Extension = _default_extension()`  
The extension that supplies settings and project directories

A standalone renderer uses default settings and has no project directories.

`context_page_path: str | None = None`  
The containing page's path relative to the output directory, apart from summary links

`_purpose: _RenderingPurpose = _RenderingPurpose.OBJECT`  

## Methods

| Name | Description |
|----|----|
| [\_\_post_init\_\_()](#great_docs.rendering.TypeAliasRenderer.__post_init__) | Narrow `doc` and [obj](../reference/rendering.RenderContext.md#great_docs._apiref._rendering._context.RenderContext.obj) to type alias documentation |
| [render_description()](#great_docs.rendering.TypeAliasRenderer.render_description) | Render the subject followed by the alias declaration, without a Usage row |
| [render_signature()](#great_docs.rendering.TypeAliasRenderer.render_signature) | Render the alias in its source form, e.g. `type Pair[T] = tuple[T, T]` |
| [render_type_parameters_section()](#great_docs.rendering.TypeAliasRenderer.render_type_parameters_section) | Render a `Type Parameters` section for a generic alias |

### \_\_post_init\_\_()

Narrow `doc` and [obj](../reference/rendering.RenderContext.md#great_docs._apiref._rendering._context.RenderContext.obj) to type alias documentation

Usage

[Source](https://github.com/posit-dev/great-docs/blob/main/great_docs/_apiref/_rendering/type_aliases.py#L40-L44)

``` python
__post_init__()
```

### render_description()

Render the subject followed by the alias declaration, without a Usage row

Usage

[Source](https://github.com/posit-dev/great-docs/blob/main/great_docs/_apiref/_rendering/type_aliases.py#L103-L117)

``` python
render_description()
```

#### Returns

`BlockContent`  
The subject and the declaration.

### render_signature()

Render the alias in its source form, e.g. `type Pair[T] = tuple[T, T]`

Usage

[Source](https://github.com/posit-dev/great-docs/blob/main/great_docs/_apiref/_rendering/type_aliases.py#L69-L101)

``` python
render_signature()
```

#### Returns

`BlockContent`  
The declaration in a `doc-signature` division.

### render_type_parameters_section()

Render a `Type Parameters` section for a generic alias

Usage

[Source](https://github.com/posit-dev/great-docs/blob/main/great_docs/_apiref/_rendering/type_aliases.py#L119-L133)

``` python
render_type_parameters_section(el)
```

#### Parameters

`el: gf.DocstringSectionTypeParameters`  
The `Type Parameters` section.

#### Returns

`BlockContent`  
The definitions as a definition list, or `None` when the section has no items.
