ts-randomizer
Version:
A tool to create random data by type parameters
32 lines (31 loc) • 775 B
TypeScript
import * as ts from 'typescript';
export interface TypeParamsMap {
[key: string]: {
type: ts.Type;
isArray?: boolean;
};
}
export declare enum PropertyType {
Boolean = "boolean",
Date = "date",
Function = "function",
Number = "number",
Object = "object",
String = "string",
Unknown = "unknown",
Null = "null",
Undefined = "undefined"
}
export type TypeDescription = PropertyDescription | PropertyType | Array<PropertyType | PropertyDescription>;
export declare enum DescriptionFlag {
Array = 0,
Tuple = 1,
Method = 2,
Enum = 3
}
export interface PropertyDescription {
key?: string;
flag?: DescriptionFlag | null;
possibleValues?: unknown | unknown[];
description: TypeDescription;
}