You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const{id, name =id}={id:"10"}as{[key:string]:string}console.log(name)//"10"
When using destructuring assignement along with default subsequent values, linter report false positives:
(no-unused-vars) `id` is never used
const {id, name = id} = {id:"10"} as {[key:string]:string}
^^
at \\test.ts:1:7
hint: If this is intentional, prefix it with an underscore like `_id`
Found 1 problem
Checked 1 file
When using destructuring assignement along with default subsequent values, linter report false positives:
Edit: Actually maybe it is actually expected to do the following?
The text was updated successfully, but these errors were encountered: