> ## Documentation Index
> Fetch the complete documentation index at: https://cdktn.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Typescript: Aspects

> CDKTN Core API Reference for Aspects in Typescript.

Aspects can be applied to CDK tree scopes and can operate on the tree before synthesis.

## Methods <a name="Methods" id="Methods" />

| **Name**                                          | **Description**                                      |
| ------------------------------------------------- | ---------------------------------------------------- |
| <code><a href="#cdktn.Aspects.add">add</a></code> | Adds an aspect to apply this scope before synthesis. |

***

### `add` <a name="add" id="cdktn.Aspects.add" />

```typescript theme={null}
public add(aspect: IAspect): void
```

Adds an aspect to apply this scope before synthesis.

#### `aspect`<sup>Required</sup> <a name="aspect" id="cdktn.Aspects.add.parameter.aspect" />

* *Type:* <a href="#cdktn.IAspect">IAspect</a>

The aspect to add.

***

## Static Functions <a name="Static Functions" id="Static Functions" />

| **Name**                                        | **Description**                                                 |
| ----------------------------------------------- | --------------------------------------------------------------- |
| <code><a href="#cdktn.Aspects.of">of</a></code> | Returns the `Aspects` object associated with a construct scope. |

***

### `of` <a name="of" id="cdktn.Aspects.of" />

```typescript theme={null}
import { Aspects } from 'cdktn'

Aspects.of(scope: IConstruct)
```

Returns the `Aspects` object associated with a construct scope.

#### `scope`<sup>Required</sup> <a name="scope" id="cdktn.Aspects.of.parameter.scope" />

* *Type:* constructs.IConstruct

The scope for which these aspects will apply.

***

## Properties <a name="Properties" id="Properties" />

| **Name**                                                   | **Type**                                             | **Description**                                                |
| ---------------------------------------------------------- | ---------------------------------------------------- | -------------------------------------------------------------- |
| <code><a href="#cdktn.Aspects.property.all">all</a></code> | <code><a href="#cdktn.IAspect">IAspect</a>\[]</code> | The list of aspects which were directly applied on this scope. |

***

### `all`<sup>Required</sup> <a name="all" id="cdktn.Aspects.property.all" />

```typescript theme={null}
public readonly all: IAspect[];
```

* *Type:* <a href="#cdktn.IAspect">IAspect</a>\[]

The list of aspects which were directly applied on this scope.

***
