Something went wrong. Try again.
Fork of github.com/ccmdi/propsec
Something went wrong. Try again.
123456789101112131415161718192021222324import { CustomType } from "../types";
/** * Global validation context */class ValidationContext { private _customTypes: CustomType[] = [];
get customTypes(): CustomType[] { return this._customTypes; }
setCustomTypes(types: CustomType[]): void { this._customTypes = types; }
getCustomType(name: string): CustomType | undefined { return this._customTypes.find(t => t.name === name); }}
// Singleton instanceexport const validationContext = new ValidationContext();