Skip to content

Commit ef2d6ab

Browse files
authored
Merge pull request #10342 from Microsoft/ambient_shorthand_is_explicit_any
Treat ambient shorthand declarations as explicit uses of the `any` type
2 parents bf63811 + ccf5bab commit ef2d6ab

File tree

4 files changed

+0
-20
lines changed

4 files changed

+0
-20
lines changed

src/compiler/checker.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17095,11 +17095,6 @@ namespace ts {
1709517095
}
1709617096
}
1709717097

17098-
if (compilerOptions.noImplicitAny && !node.body) {
17099-
// Ambient shorthand module is an implicit any
17100-
reportImplicitAnyError(node, anyType);
17101-
}
17102-
1710317098
if (node.body) {
1710417099
checkSourceElement(node.body);
1710517100
if (!isGlobalScopeAugmentation(node)) {

tests/baselines/reference/ambientShorthand_isImplicitAny.errors.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/baselines/reference/ambientShorthand_isImplicitAny.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/cases/conformance/ambient/ambientShorthand_isImplicitAny.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)