mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
Improve error message for untyped import of scoped package (#22189)
This commit is contained in:
@@ -1157,7 +1157,8 @@ namespace ts {
|
||||
return `@types/${getMangledNameForScopedPackage(packageName)}`;
|
||||
}
|
||||
|
||||
function getMangledNameForScopedPackage(packageName: string): string {
|
||||
/* @internal */
|
||||
export function getMangledNameForScopedPackage(packageName: string): string {
|
||||
if (startsWith(packageName, "@")) {
|
||||
const replaceSlash = packageName.replace(ts.directorySeparator, mangledScopedPackageSeparator);
|
||||
if (replaceSlash !== packageName) {
|
||||
|
||||
Reference in New Issue
Block a user