import { DFAAccepts } from "./dfa"; import { KleenePlusDFA, KleeneStarDFA } from "./regex"; declare type A_Z_Upper = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z"; declare type A_Z_Lower = Lowercase; /** * A character matching * `/^[a-zA-Z]$/` */ export declare type AlphaChar = A_Z_Upper | A_Z_Lower; /** * Accepts strings matching * `/^[a-zA-Z]*$/` */ declare type AlphaDFA = KleeneStarDFA; /** * Accepts strings matching * `/^[a-zA-Z]+$/` */ declare type NonEmptyAlphaDFA = KleenePlusDFA; /** * Does {@typeparam T} match `/^[a-zA-Z]*$/`? * That is, is it a string composed of only English letters? * * Type `true`, `false`, or `never`. * Will broaden to `boolean` if you pass a union type where at least one gives `true` and one gives `false`. */ export declare type IsAlpha = DFAAccepts; /** * Does {@typeparam T} match `/^[a-zA-Z]+$/`? * That is, is it a non-empty string composed of only English letters? * * Type `true`, `false`, or `never`. * Will broaden to `boolean` if you pass a union type where at least one gives `true` and one gives `false`. */ export declare type IsNonEmptyAlpha = DFAAccepts; /** * Arabic numerals (base 10 digits) */ export declare type NumChar = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"; /** * Arabic numerals (base 10 digits) */ export declare type Digit = NumChar; /** * A character matching * `/^[a-zA-Z\d]$/` */ export declare type AlphaNumChar = AlphaChar | NumChar; declare type AlphaNumDFA = KleeneStarDFA; declare type NonEmptyAlphaNumDFA = KleenePlusDFA; /** * Does {@typeparam T} match `/^[a-zA-Z\d]*$/`? * That is, is it a string composed of only English letters and Arabic numerals? * * Type `true`, `false`, or `never`. * Will broaden to `boolean` if you pass a union type where at least one gives `true` and one gives `false`. */ export declare type IsAlphaNum = DFAAccepts; /** * Does {@typeparam T} match `/^[a-zA-Z\d]+$/`? * That is, is it a non-empty string composed of only English letters and Arabic numerals? * * Type `true`, `false`, or `never`. * Will broaden to `boolean` if you pass a union type where at least one gives `true` and one gives `false`. */ export declare type IsNonEmptyAlphaNum = DFAAccepts; /** * Accepts strings matching * `/^\d+$/` */ declare type DirectIntDFA = KleenePlusDFA; /** * Does {@typeparam T} match `/^\d+$/`? * That is, is it a non-empty string composed of only Arabic numerals? * * Type `true`, `false`, or `never`. * Will broaden to `boolean` if you pass a union type where at least one gives `true` and one gives `false`. */ export declare type IsDirectInt = DFAAccepts; /** * Accepts strings matching * `/^\d+([eE][+-]?\d+)?$/` */ interface UnsignedIntDecimalDFA { startState: "integer part first"; acceptStates: "integer part" | "exponential part"; transitions: { "integer part first": Record & Record; "integer part": Record & Record<"e" | "E", "signed exponential part"> & Record; "signed exponential part": Record<"+" | "-", "exponential part first"> & Record & Record; "exponential part first": Record & Record; "exponential part": Record & Record; fail: Record; }; } /** * Does {@typeparam T} match `/^\d+([eE][+-]?\d+)?$/`? * That is, is it a common decimal or decimal-scientific form of an unsigned integer? * * Type `true`, `false`, or `never`. * Will broaden to `boolean` if you pass a union type where at least one gives `true` and one gives `false`. */ export declare type IsUnsignedIntDecimal = DFAAccepts; /** * Accepts strings matching * `/[+-]?^\d+([eE][+-]?\d+)?$/` */ interface SignedIntDecimalDFA { startState: "signed integer part"; acceptStates: "integer part" | "exponential part"; transitions: { "signed integer part": Record<"+" | "-", "integer part first"> & Record & Record; } & UnsignedIntDecimalDFA["transitions"]; } /** * Does {@typeparam T} match `/^[+-]?\d+([eE][+-]?\d+)?$/`? * That is, is it a common decimal or decimal-scientific form of an (possibly signed) integer? * * Type `true`, `false`, or `never`. * Will broaden to `boolean` if you pass a union type where at least one gives `true` and one gives `false`. */ export declare type IsIntDecimal = DFAAccepts; export {};