Closed
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Issue Description
Type of variable channel
is TextChannel
, which has a correct .toString
method. The type of variable channel
has been checked by debugging the typescript-eslint rule, using checker.typeToString
.
Other debugging shows that parent expression, channel.toString
, is of type
(() => `<#${string}>`) & (() => string)
For clarification purpose, .toString
is directly called, but done under the hood by JavaScript, and TypeScript & typescript-eslint understand that, so the result is the same.
Reproduction Repository Link
https://github.com/Catatomik/eslint-ts-fpos-no-base-to-string
Repro Steps
- clone the repo
pnpm install
npm run lint
Versions
package | version |
---|---|
typescript-eslint |
7.1.0 |
TypeScript |
5.3.3 |
ESLint |
8.57.0 |
node |
18.19.0 |