Title: Ignore certain variables when using --noUnusedLocals · Issue #13048 · microsoft/TypeScript · GitHub
Open Graph Title: Ignore certain variables when using --noUnusedLocals · Issue #13048 · microsoft/TypeScript
X Title: Ignore certain variables when using --noUnusedLocals · Issue #13048 · microsoft/TypeScript
Description: I want to use destructuring of objects while being able to ignore certain parameters. But with --noUnusedLocals I get an error. const { children, active: _a, ...rest, } = props; '_a' is declared but never used. I formerly used the tslint...
Open Graph Description: I want to use destructuring of objects while being able to ignore certain parameters. But with --noUnusedLocals I get an error. const { children, active: _a, ...rest, } = props; '_a' is declared bu...
X Description: I want to use destructuring of objects while being able to ignore certain parameters. But with --noUnusedLocals I get an error. const { children, active: _a, ...rest, } = props; '_a' is dec...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/13048
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Ignore certain variables when using --noUnusedLocals","articleBody":"I want to use destructuring of objects while being able to ignore certain parameters. But with `--noUnusedLocals` I get an error. \r\n\r\n~~~typescript\r\nconst {\r\n children,\r\n active: _a,\r\n ...rest,\r\n} = props;\r\n~~~\r\n\r\n~~~bash\r\n'_a' is declared but never used.\r\n~~~\r\n\r\nI formerly used the tslint rule `no-unsued-variable` which supported ignoring any variable having a certain pattern, e.g. any name starting with a `_`. As `tslint` deprecated `no-unsued-variable` in favor of `noUnusedLocals` I cannot rely on `tslint` anymore.\r\n\r\nIs this something which can be supported, or do I need to port over something like `lodash.omit`?","author":{"url":"https://github.com/alinhle","@type":"Person","name":"alinhle"},"datePublished":"2016-12-20T08:54:52Z","url":"https://github.com/microsoft/TypeScript/issues/13048"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e118f90c-adce-1ab6-8dac-5f4e5fd8bc86 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DF40:882E2:580D39:76DB8E:6B00CEC3 |
| html-safe-nonce | b7aa56ea2fc97324c96f672e31b9a31c9bc310b6a0580295f09dffd1fd7633f4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjQwOjg4MkUyOjU4MEQzOTo3NkRCOEU6NkIwMENFQzMiLCJ2aXNpdG9yX2lkIjoiMzQwMDkwMjU4MzA2MDA1Nzc5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fcae0ca2d09098e3408dad2e28c2858e3c755c08d729c330761ff2d2b0136045 |
| hovercard-subject-tag | issue:196617580 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/13048/issue_layout |
| twitter:image | https://opengraph.githubassets.com/66de209a40e0d636ed1dd1e5beeb0466c57c8e1a82ccf22836fc5e1a5a606caf/microsoft/TypeScript/issues/13048 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/66de209a40e0d636ed1dd1e5beeb0466c57c8e1a82ccf22836fc5e1a5a606caf/microsoft/TypeScript/issues/13048 |
| og:image:alt | I want to use destructuring of objects while being able to ignore certain parameters. But with --noUnusedLocals I get an error. const { children, active: _a, ...rest, } = props; '_a' is declared bu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | alinhle |
| hostname | github.com |
| expected-hostname | github.com |
| None | 85bbdfe2b6ba16e234513bc6ceff5d848ef8449820c900692a2b4e67061931e5 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4943239a6d2c591325dad6e5c313e1cafda877f6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width