I just using tslint but this block of code throws me a error.
const MemberNumber = 'MBR' + pinCode + sliceNumber
Operands of '+' operation must either be both strings or both numbers. Consider using a template literal @typescript-eslint/restrict-plus-operands
I tired with template method again throwing the tslint error.
const MemberNumber = `MBR${pinCode}${sliceNumber}`
Invalid type "any" of template literal expression @typescript-eslint/restrict-template-expres
how to fix this.
Thanks
It looks like pinCode
or sliceNumber
is of type number
, so converting it to a string should work:
const MemberNumber = `MBR${String(pinCode)}${String(sliceNumber)}`
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With