Skip to content

Function.IsString 1

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

umt / IsString

Function: IsString()

IsString(target, propertyKey): void

Defined in: Decorator/IsString.ts:18

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

Parameters

target

object

The class prototype.

propertyKey

string | symbol

The decorated field.

Returns

void

Example

class User {
  @IsString name = "";
}

API

Classes

Interfaces

Type Aliases

Variables

Functions

Clone this wiki locally