Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e554378

Browse filesBrowse files
committed
test: failing case for shadowed namespace in .d.ts
1 parent cd95728 commit e554378
Copy full SHA for e554378

File tree

Expand file treeCollapse file tree

2 files changed

+28
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+28
-0
lines changed
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
declare namespace foo {
2+
interface SomeInterface {
3+
a: string;
4+
}
5+
}
6+
7+
declare namespace foo.bar {
8+
interface SomeOtherInterface {
9+
b: string;
10+
}
11+
12+
function MyFunction();
13+
}
14+
15+
declare const foo: foo.SomeInterface;
16+
export = foo;

‎tests/src/rules/namespace.js

Copy file name to clipboardExpand all lines: tests/src/rules/namespace.js
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,18 @@ const valid = [
156156
},
157157
}),
158158

159+
test({
160+
code: `
161+
import * as foo from "./typescript-declare-nested-shadowed"
162+
console.log(foo.a)
163+
`,
164+
parser,
165+
settings: {
166+
'import/parsers': { [parser]: ['.ts'] },
167+
'import/resolver': { 'eslint-import-resolver-typescript': true },
168+
},
169+
}),
170+
159171
test({
160172
code: `import { foobar } from "./typescript-declare-interface"`,
161173
parser,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.