Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Tslint crashes with parameter destructuring #652

Closed
lbesson opened this issue Sep 10, 2015 · 2 comments
Closed

Tslint crashes with parameter destructuring #652

lbesson opened this issue Sep 10, 2015 · 2 comments

Comments

@lbesson
Copy link

lbesson commented Sep 10, 2015

Following code compiles fine with typescript 1.5.3, but tslint crashes

function a() {
  var b = ({c: d}) => {};
}
$ tslint test.ts

noUseBeforeDeclareRule.js:90
        for (var _i = 0; _i < highlights.length; _i++) {
                                        ^
TypeError: Cannot read property 'length' of undefined
    at NoUseBeforeDeclareWalker.validateUsageForVariable 

Not sure exactly why yet, so the issue title is probably wrong.
Tslint is fine if we remove surrounding function.

@jkillian
Copy link
Contributor

Thanks for the report @lbesson, this should be fixed in a release with in a week or so. In the meantime, I'd just disable the rule for that specific location in your code

@lbesson
Copy link
Author

lbesson commented Sep 10, 2015

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants