Commit graph

1 commit

Author SHA1 Message Date
Nathan Shively-Sanders
b7c598ea39
Use ad-hoc code for nested destructuring in require (#40188)
* Use ad-hoc code for nested destructuring in require

Nested destructuring doesn't really map to ES imports:

```js
const { utils: { nub, intercalate } } = require('./monopackage')
```

Previously, isRequireVariableDeclaration walked up binding elements
until it reached a variable declaration. This change instead only walks
up one binding element and stops. Then it's not bound as an alias and
uses the checker-only code to produce types for the nested-imported
identifiers.

Fixes #40143

* revert binder formatting change
2020-09-10 13:07:58 -07:00