File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
tests/baselines/reference Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1642,7 +1642,7 @@ namespace ts {
1642
1642
}
1643
1643
else if (noImplicitAny && moduleNotFoundError) {
1644
1644
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 ,
1646
1646
moduleReference);
1647
1647
errorInfo = chainDiagnosticMessages(errorInfo,
1648
1648
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 3310
3310
"category" : " Error" ,
3311
3311
"code" : 7034
3312
3312
},
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}';` " : {
3314
3314
"category" : " Error" ,
3315
3315
"code" : 7035
3316
3316
},
Original file line number Diff line number Diff line change 1
1
/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';`
3
3
4
4
5
5
==== /a.ts (1 errors) ====
6
6
import * as foo from "foo";
7
7
~~~~~
8
8
!!! 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';`
10
10
11
11
==== /node_modules/foo/index.js (0 errors) ====
12
12
// This tests that `--noImplicitAny` disables untyped modules.
You can’t perform that action at this time.
0 commit comments