[restrict-template-expressions] errors even when class defines toString()
#3538
Labels
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
working as intended
Issues that are closed as they are working as intended
Repro
That ☝️ creates an error saying:
Expected Result
There should be no error because the
no-base-to-string
rule should apply here; ESLint should realize that I've defined a customtoString()
method onMessage
and thusMessage
is a valid type to be in a template expression.Actual Result
I got this error from ESLint:
Versions
@typescript-eslint/eslint-plugin
4.27.0
@typescript-eslint/parser
4.27.0
TypeScript
4.3.2
ESLint
7.28.0
node
12.8.3
The text was updated successfully, but these errors were encountered: