Home > @skunkteam/types > pattern
Signature:
declare function pattern<const BrandName extends string>(
name: BrandName,
regExp: RegExp,
customMessage?: StringTypeConfig['customMessage'],
): Type<Branded<string, BrandName>, StringTypeConfig>;
Parameter | Type | Description |
---|---|---|
name | BrandName | |
regExp | RegExp | |
customMessage | StringTypeConfig['customMessage'] | (Optional) |
Returns:
Type<Branded<string, BrandName>, StringTypeConfig>