Error: The domain REST-DATA-VALIDATOR.NETLIFY.APP is not authorized to show the cookie declaration for domain group ID 24a35cd5-88b2-497b-bb37-81610ac07f04. Please add it to the domain group in the Cookiebot Manager to authorize the domain.
Skip to content

Getter Decorator

The Getter decorator simplifies the creation of a getter for a specific property, making it read-only by default but visible during property enumeration if specified.

Usage

typescript
import { Getter } from "rest-data-validator";

class Example {
    @Getter({ enumerable: true })
    private _property: string = 'default';
}

Options

  • enumerable: Make the getter enumerable (default is true).
Getter Decorator has loaded