Sha256: fdf4d81cdae6eee2ab94020d61374531818fbe9485d7854d79221b2e4a697d54
Contents?: true
Size: 1.04 KB
Versions: 32
Compression:
Stored size: 1.04 KB
Contents
/** * @fileoverview Types for object-schema package. */ /** * Built-in validation strategies. */ export type BuiltInValidationStrategy = "array" | "boolean" | "number" | "object" | "object?" | "string" | "string!"; /** * Built-in merge strategies. */ export type BuiltInMergeStrategy = "assign" | "overwrite" | "replace"; /** * Property definition. */ export interface PropertyDefinition { /** * Indicates if the property is required. */ required: boolean; /** * The other properties that must be present when this property is used. */ requires?: string[]; /** * The strategy to merge the property. */ merge: BuiltInMergeStrategy | ((target: any, source: any) => any); /** * The strategy to validate the property. */ validate: BuiltInValidationStrategy | ((value: any) => void); /** * The schema for the object value of this property. */ schema?: ObjectDefinition; } /** * Object definition. */ export type ObjectDefinition = Record<string, PropertyDefinition>;
Version data entries
32 entries across 32 versions & 2 rubygems