A TypeScript module for Luren that uses decorators to define schemas, metadata, and validation for objects. Current stable version 0.2.8 (low release cadence). Key differentiator: uses decorators to inject type metadata at class definition, enabling schema generation (`getJsSchema`) and runtime operations (validate, serialize, deserialize) without separate schema files. Requires experimentalDecorators enabled. Built-in types: string, boolean, number, integer, date, array, object. Limited community adoption.
npm install luren-schemaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Defines a Person class with decorators, generates a schema, validates, serializes, and deserializes an instance.
Import directly from 'luren-schema' (no subpaths).
Consider using libraries with standard decorators if TS stabilizes them.
Ensure every property you want in the schema has @Prop decorator.
Add @Prop decorator with serialization options if needed.
Use array destructuring: const [valid, error] = JsTypes.validate(obj, schema);
Add '"experimentalDecorators": true' to tsconfig.json.
Ensure you create an instance with 'new Person(...)' before calling JsTypes methods.
Run 'npm install luren-schema' and ensure import path is correct.
No dependency data recorded yet.