Microsoft/TypeScript
Ver no GitHubGive a better error message when an import isn't found but a namespace of the same name exists
Open
#10.464 aberto em 21 de ago. de 2016
BugDomain: Error MessagesEffort: ModerateHelp Wanted
Métricas do repositório
- Stars
- (48.455 stars)
- Métricas de merge de PR
- (Mesclagem média 6d 17h) (9 fundiu PRs em 30d)
Description
See #10463.
foo.d.ts
declare module foo {
// ...
}
bar.ts
import foo = require("foo");
"foo" won't be found, but if the compiler can resolve an identifier named foo to a namespace that uses the declare module syntax, we should probably give an error like
Cannot find module 'foo'.
A legacy-style namespace with the same name was found.
Try changing the declaration to use quotes (e.g. 'declare module "foo"').