@tsed/schema
Version:
JsonSchema module for Ts.ED Framework
17 lines (16 loc) • 320 B
JavaScript
import { JsonEntityFn } from "./jsonEntityFn.js";
/**
* Set the property as readOnly.
*
* @returns {Function}
* @decorator
* @validation
* @property
* @parameter
* @schema
*/
export function ReadOnly(readOnly = true) {
return JsonEntityFn((store) => {
store.itemSchema.readOnly(readOnly);
});
}