Title: Ignore Specific Error [AGAIN] · Issue #38409 · microsoft/TypeScript · GitHub
Open Graph Title: Ignore Specific Error [AGAIN] · Issue #38409 · microsoft/TypeScript
X Title: Ignore Specific Error [AGAIN] · Issue #38409 · microsoft/TypeScript
Description: Yes, this is a duplicate of #11051, but that issue is closed and this NEEDS to be addressed. People use Typescript for more than just Javascript compilation now. There are tons of transpilers that convert TS to all sorts of useful langua...
Open Graph Description: Yes, this is a duplicate of #11051, but that issue is closed and this NEEDS to be addressed. People use Typescript for more than just Javascript compilation now. There are tons of transpilers that ...
X Description: Yes, this is a duplicate of #11051, but that issue is closed and this NEEDS to be addressed. People use Typescript for more than just Javascript compilation now. There are tons of transpilers that ...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/38409
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Ignore Specific Error [AGAIN]","articleBody":"Yes, this is a duplicate of #11051, but that issue is closed and this **NEEDS** to be addressed.\r\n\r\nPeople use Typescript for more than just Javascript compilation now. There are tons of transpilers that convert TS to all sorts of useful languages. Typescript must have a proper way to disable certain error codes project-wide.\r\n\r\nMy specific issue right now is that I'm using TypescriptToLua, a Typescript transpiler that produces lua code, and Typescript throws a fit whenever I try to use mathematical operators on classes. This would make sense if I was compiling to Javascript, but I'm not, but I'm forced to annotate every line with @ts-ignore (unrealistic) or suffer through constant reports of TS2362 and TS2363 in my console (infuriating).\r\n\r\nThere could easily be an `ignoreErrors: number[]` in the .tsconfig file that provides this functionality. The only thing stopping it from existing is stubborness. Well designed errors that never cause issues are a nice dream, but realistically there will always be use cases that are not met by the error handler, and the user should have the power to suppress invalid warnings.\r\n\r\nA short example of my issue:\r\n\r\n**Typescript that will be converted using TypescriptToLua:**\r\n\r\n```Typescript\r\n/** @customConstructor vector.new */\r\ndeclare class Vector {\r\n\tconstructor(x: number, y?: number, z?: number);\r\n}\r\n\r\nconst v = new Vector(1, 2, 3);\r\nconst vSquared = v * v;\r\n```\r\n\r\n**Generated (valid) lua code:**\r\n\r\n```Lua\r\n--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]\r\nv = vector.new(1, 2, 3)\r\nvSquared = v * v\r\n```\r\n\r\n**Obnoxious compiler output:**\r\n```\r\nmain.ts:9:18 - error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.\r\n\r\n9 const vSquared = v * v;\r\n ~\r\n\r\nmain.ts:9:22 - error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.\r\n\r\n9 const vSquared = v * v;\r\n ~\r\n```\r\n\r\nThank you for your time, I hope that this issue can be seen as what is is, which is a frustrating lack of user control and agency.","author":{"url":"https://github.com/Aurailus","@type":"Person","name":"Aurailus"},"datePublished":"2020-05-07T23:51:38Z","url":"https://github.com/microsoft/TypeScript/issues/38409"}
| 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:f748d8bf-aec0-8a45-e24e-d66feb44fa2d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E908:A99C2:BD309E:F47944:6B00EA0E |
| html-safe-nonce | 4078eca31050f9aee6c61218571c14ed3d6fc6fb331fdb07e553d6fffd06c56a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTA4OkE5OUMyOkJEMzA5RTpGNDc5NDQ6NkIwMEVBMEUiLCJ2aXNpdG9yX2lkIjoiNzY4Mjg5MTQ5MjkxMzkwMDA0NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5ea20752ddf0d350986bbd023508639dca0ad8371089933652b7fc9a7c8ff947 |
| hovercard-subject-tag | issue:614412893 |
| 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/38409/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4ab207d21b727c9930c381d54573ec13610ef1ca933b62211444fcd3de986abe/microsoft/TypeScript/issues/38409 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4ab207d21b727c9930c381d54573ec13610ef1ca933b62211444fcd3de986abe/microsoft/TypeScript/issues/38409 |
| og:image:alt | Yes, this is a duplicate of #11051, but that issue is closed and this NEEDS to be addressed. People use Typescript for more than just Javascript compilation now. There are tons of transpilers that ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Aurailus |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| 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 | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width