smart-types-ts
Version:
A collection of _Smart Types_ and _Smart Constructors_ which enable you to be more strict when defining your application's important types/interfaces.
10 lines (9 loc) • 427 B
TypeScript
import { SmartConstructor, SmartTypeRefined } from "../utilTypes";
export declare type StringWithLength<Min extends number, Max extends number> = SmartTypeRefined<string, "StringWithLength", {
min: Min;
max: Max;
}>;
export declare const mkStringWithLength: <Min extends number, Max extends number>(min: Min, max: Max) => SmartConstructor<SmartTypeRefined<string, "StringWithLength", {
min: Min;
max: Max;
}>>;