Skip to content

Better hints for 'cannot find name' errors #25309

Closed
@DanielRosenwasser

Description

@DanielRosenwasser

Discussed at #25306

We found that for "Cannot find name" errors, certain identifiers were fairly frequent:

require, map, buffer, describe, $, asyncIterator, process, symbol, module, promise

We're thinking that we can elaborate beyond the usual error message.

  • $ => Suggest jQuery
  • describe => Did you mean to have types for mocha, jest, etc.?
  • process, require, module => Suggest including Node types
  • Symbol, Promise, Map, Set, WeakMap, WeakSet, Iterator, AsyncIterator => User needs to set a different lib or target.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: Error MessagesThe issue relates to error messagingFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions