import { BaseEntity } from '@/infrastructure/Entity/BaseEntity' ; import { IScript } from '@/domain/IScript' ; export class SelectedScript extends BaseEntity < string > { constructor ( public readonly script , public readonly revert ) { super ( script . id ) ; if ( revert && ! script . canRevert ( ) ) { throw new Error ( 'cannot revert an irreversible script' ) ; } } }