-
Notifications
You must be signed in to change notification settings - Fork 887
TypeError: Cannot read property 'flags' of undefined (no-unused-variable) #3001
Comments
Related? |
I have been having the same problem for some months now too. |
@danielweck I don't think it is related, #2649 seems to appear only on windows and I have the same exact problem as you on linux :) |
See also #2876 |
I have the exact same stacktrace in our (private) project, From what I have read, the only difference I can spot between this error and #2876 is that it also occurs when there is no unused variable. |
we have same issue as well tslint 5.5.0 |
I have the same issue as well. tslint: 5.5.0 https://travis-ci.org/westy92/html-pdf-chrome/jobs/255121048#L1299 |
same issue here tslint: 5.5.0 |
I have submitted PR for this: microsoft/TypeScript#17367 |
Does anyone have a simple codebase to reproduce the issue as a regression test? |
@DanielRosenwasser #2876 contains a minimal reproduction for this issue |
Avoid typescript crash when trying to get type of destructured variable declaration. Also avoid walking the AST multiple times when `--declaration` is not enabled. That should result in better performance and fewer false negatives. [bugfix] `no-unused-variable` fixed crash when using destructuring Fixes: #2876 Fixes: #3001
Avoid typescript crash when trying to get type of destructured variable declaration. Also avoid walking the AST multiple times when `--declaration` is not enabled. That should result in better performance and fewer false negatives. [bugfix] `no-unused-variable` fixed crash when using destructuring Fixes: palantir#2876 Fixes: palantir#3001
"TypeError: Cannot read property 'flags' of undefined" with
no-unused-variable
rule.TypeScript
2.4.1
https://unpkg.com/typescript@2.4.1/
TSlint
5.5.0
https://unpkg.com/tslint@5.5.0/
Running TSlint via CLI (
package.json
script withtslint --type-check --project "./tsconfig.json" -c "./tslint.json" "./src/**/*.ts"
)tslint.json
configuration:The text was updated successfully, but these errors were encountered: