Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 1.15 KB

types.pattern.md

File metadata and controls

27 lines (19 loc) · 1.15 KB

Home > @skunkteam/types > pattern

pattern() function

Signature:

declare function pattern<const BrandName extends string>(
    name: BrandName,
    regExp: RegExp,
    customMessage?: StringTypeConfig['customMessage'],
): Type<Branded<string, BrandName>, StringTypeConfig>;

Parameters

Parameter Type Description
name BrandName
regExp RegExp
customMessage StringTypeConfig['customMessage'] (Optional)

Returns:

Type<Branded<string, BrandName>, StringTypeConfig>