import { Constraints, StateConstraints } from "../types"; // The constraints type shares the properties of the state, // but never has any members const EMPTY_CONSTRAINTS = new Proxy(Object.freeze({}), { get() { return {}; }, }); /** A constraint that does nothing. */ export class IdentityConstraint implements StateConstraints { /** Instantiate the identity constraint */ constructor() {} readonly constraints: Readonly> = EMPTY_CONSTRAINTS; adjust(state: State) { return state; } fix(state: State) { return state; } }