Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 445 Bytes

declared-field.md

File metadata and controls

24 lines (16 loc) · 445 Bytes
title declared-field: Decorated field is erased
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

@field(String) declare title: string;

Good

@field(String) title!: string;