Skip to content

Function.Min 1

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

umt / Min

Function: Min()

Min(minimum): (target, propertyKey) => void

Defined in: Decorator/Min.ts:19

Property decorator factory that requires a numeric field to be greater than or equal to minimum. Non-numeric values fail. Reuses the existing minValue validator.

Parameters

minimum

number

The smallest accepted value.

Returns

A property decorator.

(target, propertyKey) => void

Example

class Account {
  @Min(0) balance = 0;
}

API

Classes

Interfaces

Type Aliases

Variables

Functions

Clone this wiki locally