UNPKG

@featurevisor/types

Version:

Common Typescript types for Featurevisor

47 lines (42 loc) 902 B
export type AttributeKey = string; export interface AttributeObjectValue { [key: AttributeKey]: AttributeValue; } export type AttributeValue = | string | number | boolean | Date | null | undefined | string[] | AttributeObjectValue; export type AttributeType = | "boolean" | "string" | "integer" | "double" | "date" | "semver" | "object" | "array"; export interface Attribute { archived?: boolean; // only available in YAML files key?: AttributeKey; // needed for supporting v1 datafile generation type: AttributeType; description?: string; // only available in YAML files properties?: { [key: AttributeKey]: { type: | "boolean" | "string" | "integer" | "double" | "date" | "semver" // | "object" // NOTE: avoid nesting for now | "array"; description?: string; }; }; }