---
title: 'declared-field: Decorated field is erased'
editUrl: https://github.com/Cratis/Arc.TypeScript/edit/main/Documentation/code-analysis/declared-field.md
description: Emit decorated class fields rather than declaring them away.
---


## What

A decorated property uses `declare`. Rule: `arc-core/declared-field`.

## Why

`declare` erases the property from the emitted class; use a definite assignment assertion when Arc initializes it.

## Bad

```ts
@field(String) declare title: string;
```

## Good

```ts
@field(String) title!: string;
```
