File tree Expand file tree Collapse file tree
tests/baselines/reference Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1642,7 +1642,7 @@ namespace ts {
16421642 }
16431643 else if (noImplicitAny && moduleNotFoundError) {
16441644 let errorInfo = chainDiagnosticMessages(/*details*/ undefined,
1645- Diagnostics.Try_npm_install_types_Slash_0_if_it_exists_or_adding_declare_module_0_in_a_separate_file ,
1645+ Diagnostics.Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0 ,
16461646 moduleReference);
16471647 errorInfo = chainDiagnosticMessages(errorInfo,
16481648 Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type,
Original file line number Diff line number Diff line change 33103310 "category" : " Error" ,
33113311 "code" : 7034
33123312 },
3313- "Try `npm install @types/{0}` if it exists or adding `declare module '{0}'` in a separate file. " : {
3313+ "Try `npm install @types/{0}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';` " : {
33143314 "category" : " Error" ,
33153315 "code" : 7035
33163316 },
Original file line number Diff line number Diff line change 11/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.
2- Try `npm install @types/foo` if it exists or adding `declare module 'foo'` in a separate file.
2+ Try `npm install @types/foo` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo';`
33
44
55==== /a.ts (1 errors) ====
66 import * as foo from "foo";
77 ~~~~~
88!!! error TS7016: Could not find a declaration file for module 'foo'. '/node_modules/foo/index.js' implicitly has an 'any' type.
9- !!! error TS7016: Try `npm install @types/foo` if it exists or adding `declare module 'foo'` in a separate file.
9+ !!! error TS7016: Try `npm install @types/foo` if it exists or add a new declaration (.d.ts) file containing `declare module 'foo';`
1010
1111==== /node_modules/foo/index.js (0 errors) ====
1212 // This tests that `--noImplicitAny` disables untyped modules.
You can’t perform that action at this time.
0 commit comments