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
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Commit fc56160

Browse filesBrowse files
authored
fix(no-single-declare-module): allow single wildcard module declaration (#339)
1 parent b0ddfa0 commit fc56160
Copy full SHA for fc56160

File tree

Expand file treeCollapse file tree

2 files changed

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

2 files changed

+6
-0
lines changed

‎src/rules/noSingleDeclareModuleRule.ts

Copy file name to clipboardExpand all lines: src/rules/noSingleDeclareModuleRule.ts
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ function walk(ctx: Lint.WalkContext<void>): void {
3434
let moduleDecl: ts.ModuleDeclaration | undefined;
3535
for (const statement of sourceFile.statements) {
3636
if (ts.isModuleDeclaration(statement) && ts.isStringLiteral(statement.name)) {
37+
if (statement.name.text.indexOf('*') !== -1) {
38+
// Ignore wildcard module declarations
39+
return;
40+
}
41+
3742
if (moduleDecl === undefined) {
3843
moduleDecl = statement;
3944
} else {
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare module "*.svg" {}

0 commit comments

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