mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge pull request #26121 from mattmccutchen/issue-23999
"Could not find a declaration file for module" error needs to use the unmangled package name where appropriate.
This commit is contained in:
@@ -2244,8 +2244,9 @@ namespace ts {
|
||||
? chainDiagnosticMessages(
|
||||
/*details*/ undefined,
|
||||
typesPackageExists(packageId.name)
|
||||
? Diagnostics.If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_0
|
||||
: Diagnostics.Try_npm_install_types_Slash_0_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,
|
||||
? Diagnostics.If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1
|
||||
: Diagnostics.Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,
|
||||
packageId.name,
|
||||
getMangledNameForScopedPackage(packageId.name))
|
||||
: undefined;
|
||||
errorOrSuggestion(isError, errorNode, chainDiagnosticMessages(
|
||||
|
||||
@@ -3901,7 +3901,7 @@
|
||||
"category": "Error",
|
||||
"code": 7034
|
||||
},
|
||||
"Try `npm install @types/{0}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`": {
|
||||
"Try `npm install @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`": {
|
||||
"category": "Error",
|
||||
"code": 7035
|
||||
},
|
||||
@@ -3921,7 +3921,7 @@
|
||||
"category": "Error",
|
||||
"code": 7039
|
||||
},
|
||||
"If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{0}`": {
|
||||
"If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}`": {
|
||||
"category": "Error",
|
||||
"code": 7040
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user