Title: Class method autocompletions not working properly on class with mixins · Issue #26275 · microsoft/TypeScript · GitHub
Open Graph Title: Class method autocompletions not working properly on class with mixins · Issue #26275 · microsoft/TypeScript
X Title: Class method autocompletions not working properly on class with mixins · Issue #26275 · microsoft/TypeScript
Description: From Florian Bienefelt (@Floriferous) on August 6, 2018 20:25 When composing a class together through mixins, the intellisense autocompletion does not work properly: // @flow /* eslint-env mocha */ import { expect } from 'chai'; import {...
Open Graph Description: From Florian Bienefelt (@Floriferous) on August 6, 2018 20:25 When composing a class together through mixins, the intellisense autocompletion does not work properly: // @flow /* eslint-env mocha */...
X Description: From Florian Bienefelt (@Floriferous) on August 6, 2018 20:25 When composing a class together through mixins, the intellisense autocompletion does not work properly: // @flow /* eslint-env mocha */...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/26275
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Class method autocompletions not working properly on class with mixins","articleBody":"_From @Floriferous on August 6, 2018 20:25_\n\nWhen composing a class together through mixins, the intellisense autocompletion does not work properly:\r\n\r\n```js\r\n// @flow\r\n/* eslint-env mocha */\r\nimport { expect } from 'chai';\r\nimport { compose } from 'recompose';\r\n\r\nclass RootCalculator {\r\n constructor() {\r\n this.initializer = 2;\r\n }\r\n\r\n add(a: number, b: number): number {\r\n return a + b;\r\n }\r\n\r\n returnVarParent() {\r\n return this.var;\r\n }\r\n\r\n return2(): number {\r\n return 2;\r\n }\r\n\r\n parentFunc() {\r\n return this.childFunc();\r\n }\r\n}\r\n\r\nconst withCalc2 = (SuperClass = class {}) =>\r\n class extends SuperClass {\r\n constructor() {\r\n super();\r\n this.initializer = this.initializer * 2;\r\n }\r\n\r\n increment(a: number): number {\r\n return a + 1;\r\n }\r\n\r\n setVar(value): void {\r\n this.var = value;\r\n }\r\n };\r\n\r\nconst withCalc3 = SuperClass =>\r\n class extends SuperClass {\r\n constructor() {\r\n super();\r\n this.initializer = this.initializer + 1;\r\n }\r\n\r\n multiply(a: number, b: number): number {\r\n return a * b;\r\n }\r\n\r\n returnVarChild(): void {\r\n return this.var;\r\n }\r\n\r\n return2(): number {\r\n return -2;\r\n }\r\n\r\n childFunc() {\r\n return 'it works';\r\n }\r\n };\r\n\r\nconst UberClass = compose(\r\n withCalc3,\r\n withCalc2,\r\n)(RootCalculator);\r\n\r\nconst calculator = new UberClass();\r\n\r\ncalculator. // Wait for autocomplete, it can't find the class methods, or suggests them after plenty of other stuff\r\n```\r\n\r\n\u003cimg width=\"534\" alt=\"screen shot 2018-08-06 at 22 24 33\" src=\"https://user-images.githubusercontent.com/10428082/43739208-888aef5c-99c7-11e8-9676-6002140072d2.png\">\r\n\n\n_Copied from original issue: Microsoft/vscode#55910_","author":{"url":"https://github.com/mjbvz","@type":"Person","name":"mjbvz"},"datePublished":"2018-08-07T20:45:33Z","url":"https://github.com/microsoft/TypeScript/issues/26275"}
| 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:c49a0cc1-4598-a4fb-edeb-040151f667b0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CC78:34CAB:2911FD0:34819EF:6B01ACDF |
| html-safe-nonce | 43e65536654389d632f04454b1a582ea7d01737416e8f8a631c2e6f1ad2dea93 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzc4OjM0Q0FCOjI5MTFGRDA6MzQ4MTlFRjo2QjAxQUNERiIsInZpc2l0b3JfaWQiOiI2NzU4OTA5MTkxMzQxMDU5Mjk1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 71e081542a90d0b5e32f4cabe1bbf4ed297ce2dd4505a90a357ac1cd68156c9a |
| hovercard-subject-tag | issue:348480646 |
| 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/26275/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0068f8aa06aae6538cf3063eefccd8edc0362addac91f87b401a347770a42456/microsoft/TypeScript/issues/26275 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0068f8aa06aae6538cf3063eefccd8edc0362addac91f87b401a347770a42456/microsoft/TypeScript/issues/26275 |
| og:image:alt | From Florian Bienefelt (@Floriferous) on August 6, 2018 20:25 When composing a class together through mixins, the intellisense autocompletion does not work properly: // @flow /* eslint-env mocha */... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mjbvz |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width