(usedNamesInScopeInfo, module, id)
| 233 | * @returns {ScopeInfo} info |
| 234 | */ |
| 235 | const getUsedNamesInScopeInfo = (usedNamesInScopeInfo, module, id) => { |
| 236 | // nested maps avoid building a `${module}-${id}` key string per lookup |
| 237 | let byId = usedNamesInScopeInfo.get(module); |
| 238 | if (byId === undefined) { |
| 239 | byId = new Map(); |
| 240 | usedNamesInScopeInfo.set(module, byId); |
| 241 | } |
| 242 | let info = byId.get(id); |
| 243 | if (info === undefined) { |
| 244 | info = { |
| 245 | usedNames: new Set(), |
| 246 | alreadyCheckedScopes: new Set() |
| 247 | }; |
| 248 | byId.set(id, info); |
| 249 | } |
| 250 | return info; |
| 251 | }; |
| 252 | |
| 253 | module.exports = { |
| 254 | DEFAULT_EXPORT, |
no test coverage detected