mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-13 06:20:23 -06:00
Change diagnostic message
This commit is contained in:
parent
4937d9c8b4
commit
ce099e5374
@ -1401,7 +1401,7 @@ namespace ts {
|
||||
if (compilerOptions.noImplicitAny) {
|
||||
if (moduleNotFoundError) {
|
||||
error(errorNode,
|
||||
Diagnostics.A_package_for_0_was_found_at_1_but_is_untyped_Because_noImplicitAny_is_enabled_this_package_must_have_a_declaration,
|
||||
Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type,
|
||||
moduleReference,
|
||||
resolvedModule.resolvedFileName);
|
||||
}
|
||||
|
||||
@ -2869,10 +2869,6 @@
|
||||
"category": "Error",
|
||||
"code": 6143
|
||||
},
|
||||
"A package for '{0}' was found at '{1}', but is untyped. Because '--noImplicitAny' is enabled, this package must have a declaration.": {
|
||||
"category": "Error",
|
||||
"code": 6144
|
||||
},
|
||||
"Variable '{0}' implicitly has an '{1}' type.": {
|
||||
"category": "Error",
|
||||
"code": 7005
|
||||
@ -2905,6 +2901,10 @@
|
||||
"category": "Error",
|
||||
"code": 7015
|
||||
},
|
||||
"Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type.": {
|
||||
"category": "Error",
|
||||
"code": 7016
|
||||
},
|
||||
"Index signature of object type implicitly has an 'any' type.": {
|
||||
"category": "Error",
|
||||
"code": 7017
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
/a.ts(1,22): error TS6144: A package for 'foo' was found at '/node_modules/foo/index.js', but is untyped. Because '--noImplicitAny' is enabled, this package must have a declaration.
|
||||
/a.ts(1,22): error TS7016: Could not find a declaration file for module 'foo'. '/node_modules/foo/index.js' implicitly has an 'any' type.
|
||||
|
||||
|
||||
==== /a.ts (1 errors) ====
|
||||
import * as foo from "foo";
|
||||
~~~~~
|
||||
!!! error TS6144: A package for 'foo' was found at '/node_modules/foo/index.js', but is untyped. Because '--noImplicitAny' is enabled, this package must have a declaration.
|
||||
!!! error TS7016: Could not find a declaration file for module 'foo'. '/node_modules/foo/index.js' implicitly has an 'any' type.
|
||||
|
||||
==== /node_modules/foo/index.js (0 errors) ====
|
||||
// This tests that `--noImplicitAny` disables untyped modules.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user