Angular TypeScript, expecting string but get '[object Object]' -


here part of class:

export class token {     constructor(         private type: string,         private encoded: string) {         ... ...     }     ... ...      tostring(): string {         return this.type;     } } 

call this:

... ...     let str: string = token.tostring(); 

check value it's

[object object] 

expecting string passed constructor.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -