@sinclair/typebox
Version:
Json Schema Type Builder with Static Type Resolution for TypeScript
15 lines (14 loc) • 546 B
TypeScript
import type { SchemaOptions } from '../schema/index';
import type { TSchema } from '../schema/index';
import { Kind } from '../symbols/index';
export interface TRegExp extends TSchema {
[Kind]: 'RegExp';
static: `${string}`;
type: 'RegExp';
source: string;
flags: string;
}
/** `[JavaScript]` Creates a RegExp type */
export declare function RegExp(pattern: string, options?: SchemaOptions): TRegExp;
/** `[JavaScript]` Creates a RegExp type */
export declare function RegExp(regex: RegExp, options?: SchemaOptions): TRegExp;