import { shallowEqual } from 'shallow-equal-object' ; interface IValueObjectProps { [ index ] : any ; } desc export abstract class ValueObject < T extends IValueObjectProps > { public readonly props : T ; constructor ( props ) { this . props = Object . freeze ( props ) ; } public equals ( vo ? ) { if ( vo === null || vo === undefined ) { return false ; } if ( vo . props === undefined ) { return false ; } return shallowEqual ( this . props , vo . props ) ; } }