UNPKG

adonisjs-livewire

Version:

A front-end framework for AdonisJS

16 lines (15 loc) 460 B
import { Decorator } from '../support_decorators/decorator.js'; import { CannotUpdateLockedPropertyException } from './cannot_update_locked_property_exception.js'; export default class Locked extends Decorator { name; constructor(name) { super(); this.name = name; } update(property) { if (this.name !== property) { return; } throw new CannotUpdateLockedPropertyException(this.name); } }