Better hints for 'cannot find name' errors · Issue #25309 · microsoft/TypeScript (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
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 jQuerydescribe
=> Did you mean to have types for mocha, jest, etc.?process
,require
,module
=> Suggest including Node typesSymbol
,Promise
,Map
,Set
,WeakMap
,WeakSet
,Iterator
,AsyncIterator
=> User needs to set a differentlib
ortarget
.