[no-unsafe-member-access] Not allowing "interface X extends" for a type in a nested namespace #3292
Closed
3 tasks done
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
bug
Something isn't working
locked due to age
Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Repro
Playground
I wasn't able to build a repro for this issue, but it really seems like a bug.
I have the following
d.ts
file on my project (I'm using namespaces to organize my types).XXX.d.ts
So the
XXX
is ambient and theWWW
namespace is nested within it.I need to extend the
Temp2
interface, that lives on the nestedWWW
namespace.So I did this:
And I got this error:
So I thought: "eslint might not be detecting the XXX namespace". But that is not true, as you can see that the following code works fine when extending
Temp1
which is a direct member of the XXX namespace.And what is even weirder is that if I use an intermediate
AUX
type, it works fine:Expected Result
There shouldn't be any errors when extending a nested namespace.
Actual Result
The
@typescript-eslint/no-unsafe-member-access
is being triggered.Additional Info
Versions
@typescript-eslint/eslint-plugin
4.22.0
@typescript-eslint/parser
4.22.0
TypeScript
4.2.4
ESLint
7.24.0
node
10.19.0
.eslintrc.js
tsconfig.json
The text was updated successfully, but these errors were encountered: