Skip to content

Function.IsBoolean

github-actions[bot] edited this page Jul 8, 2026 · 20 revisions

umt / IsBoolean

Function: IsBoolean()

IsBoolean(target, propertyKey): void

Defined in: Decorator/IsBoolean.ts:17

Property decorator that requires the decorated field to hold a boolean. The rule is consumed by validateInstance and Validatable.

Parameters

target

object

The class prototype.

propertyKey

string | symbol

The decorated field.

Returns

void

Example

class Settings {
  @IsBoolean enabled = false;
}

API

Classes

Interfaces

Type Aliases

Variables

Functions

Clone this wiki locally