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

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -