mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
Reword message:more detail about declaration files
This commit is contained in:
parent
65dae3b0b8
commit
3b8cafe40e
@ -1642,7 +1642,7 @@ namespace ts {
|
||||
}
|
||||
else if (noImplicitAny && moduleNotFoundError) {
|
||||
let errorInfo = chainDiagnosticMessages(/*details*/ undefined,
|
||||
Diagnostics.Try_npm_install_types_Slash_0_if_it_exists_or_adding_declare_module_0_in_a_separate_file,
|
||||
Diagnostics.Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,
|
||||
moduleReference);
|
||||
errorInfo = chainDiagnosticMessages(errorInfo,
|
||||
Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type,
|
||||
|
||||
@ -3310,7 +3310,7 @@
|
||||
"category": "Error",
|
||||
"code": 7034
|
||||
},
|
||||
"Try `npm install @types/{0}` if it exists or adding `declare module '{0}'` in a separate file.": {
|
||||
"Try `npm install @types/{0}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`": {
|
||||
"category": "Error",
|
||||
"code": 7035
|
||||
},
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
/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.
|
||||
Try `npm install @types/foo` if it exists or adding `declare module 'foo'` in a separate file.
|
||||
Try `npm install @types/foo` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo';`
|
||||
|
||||
|
||||
==== /a.ts (1 errors) ====
|
||||
import * as foo from "foo";
|
||||
~~~~~
|
||||
!!! error TS7016: Could not find a declaration file for module 'foo'. '/node_modules/foo/index.js' implicitly has an 'any' type.
|
||||
!!! error TS7016: Try `npm install @types/foo` if it exists or adding `declare module 'foo'` in a separate file.
|
||||
!!! error TS7016: Try `npm install @types/foo` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo';`
|
||||
|
||||
==== /node_modules/foo/index.js (0 errors) ====
|
||||
// This tests that `--noImplicitAny` disables untyped modules.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user