Open christo8989 opened 7 years ago
I would love to specify a base object/prototype when I call getObject.
class Person { ... } this.cookies.getObject('people', Person)
Why?
I'm using typescript and creating "classes" with properties on them. For example:
class Person { constructor( public firstname: string, public lastname: string) { } get fullname() { return `${this.firstname} ${this.lastname}`; } }
When I use this.cookies.getObject('people'), I lose the fullname property becuase it exists on the prototype.
this.cookies.getObject('people')
fullname
I would love to specify a base object/prototype when I call getObject.
Why?
I'm using typescript and creating "classes" with properties on them. For example:
When I use
this.cookies.getObject('people')
, I lose thefullname
property becuase it exists on the prototype.