mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 11:54:44 -06:00
Merge pull request #10342 from Microsoft/ambient_shorthand_is_explicit_any
Treat ambient shorthand declarations as explicit uses of the `any` type
This commit is contained in:
commit
ef2d6ab014
@ -17095,11 +17095,6 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
if (compilerOptions.noImplicitAny && !node.body) {
|
||||
// Ambient shorthand module is an implicit any
|
||||
reportImplicitAnyError(node, anyType);
|
||||
}
|
||||
|
||||
if (node.body) {
|
||||
checkSourceElement(node.body);
|
||||
if (!isGlobalScopeAugmentation(node)) {
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
tests/cases/conformance/ambient/ambientShorthand_isImplicitAny.ts(1,16): error TS7005: Variable '"jquery"' implicitly has an 'any' type.
|
||||
|
||||
|
||||
==== tests/cases/conformance/ambient/ambientShorthand_isImplicitAny.ts (1 errors) ====
|
||||
declare module "jquery";
|
||||
~~~~~~~~
|
||||
!!! error TS7005: Variable '"jquery"' implicitly has an 'any' type.
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
//// [ambientShorthand_isImplicitAny.ts]
|
||||
declare module "jquery";
|
||||
|
||||
|
||||
//// [ambientShorthand_isImplicitAny.js]
|
||||
@ -1,2 +0,0 @@
|
||||
// @noImplicitAny: true
|
||||
declare module "jquery";
|
||||
Loading…
x
Reference in New Issue
Block a user