-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issueenhancement: new base rule extensionNew base rule extension required to handle a TS specific caseNew base rule extension required to handle a TS specific casepackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
I'd like to use the prefer-destructuring
rule from ESLint, however, when I try to use array destructuring with an Express request object, I get the following TypeScript Error:
Type 'ParamsDictionary' must have a '[Symbol.iterator]()' method that returns an iterator.ts(2488)
.
That seems reasonable, but then the base ESLint prefer-destructuring
rule gives me a warning, even though TypeScript claims I'm not allowed to use array destructuring here.
I think having a type-aware version of this rule would be beneficial.
Metadata
Metadata
Assignees
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issueenhancement: new base rule extensionNew base rule extension required to handle a TS specific caseNew base rule extension required to handle a TS specific casepackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin