export class Attributes < T > { constructor ( private data ) { } get = < K extends keyof T > ( key ) : T [ K ] => { return this . data [ key ] ; } ; set ( update ) { Object . assign ( this . data , update ) ; } getAll ( ) { return this . data ; } }