Title: Can't extend WeakMap in type-checked JS files · Issue #23551 · microsoft/TypeScript · GitHub
Open Graph Title: Can't extend WeakMap in type-checked JS files · Issue #23551 · microsoft/TypeScript
X Title: Can't extend WeakMap in type-checked JS files · Issue #23551 · microsoft/TypeScript
Description: TypeScript Version: 2.8.1 Search Terms: extend WeakMap, WeakSet, "Base constructors must all have the same return type." Code class ColorMap extends WeakMap { constructor(color) { super(); } } Type-checked using: tsc color.js -t es6 --ch...
Open Graph Description: TypeScript Version: 2.8.1 Search Terms: extend WeakMap, WeakSet, "Base constructors must all have the same return type." Code class ColorMap extends WeakMap { constructor(color) { super(); } } Type...
X Description: TypeScript Version: 2.8.1 Search Terms: extend WeakMap, WeakSet, "Base constructors must all have the same return type." Code class ColorMap extends WeakMap { constructor(color) { super()...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/23551
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Can't extend WeakMap in type-checked JS files","articleBody":"**TypeScript Version:** 2.8.1\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:** \r\nextend WeakMap, WeakSet, \"Base constructors must all have the same return type.\" \r\n\r\n**Code**\r\n\r\n```js\r\nclass ColorMap extends WeakMap {\r\n constructor(color) {\r\n super();\r\n }\r\n}\r\n```\r\n\r\nType-checked using:\r\n```\r\ntsc color.js -t es6 --checkJs --allowJs --noEmit\r\n```\r\n\r\n**Actual behavior:**\r\n```\r\ncolor.js(1,24): error TS2510: Base constructors must all have the same return type.\r\n```\r\n\r\n**Notes:**\r\nIt works with a `Map` or `Set`, or in a `*.ts` file.","author":{"url":"https://github.com/zombie","@type":"Person","name":"zombie"},"datePublished":"2018-04-19T22:40:30Z","url":"https://github.com/microsoft/TypeScript/issues/23551"}
| 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:a4a0d88c-2efd-4162-9844-17ae8197fb19 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8F72:2F9718:815E17:AEFC60:6B00E40F |
| html-safe-nonce | e5e2da0ddeab7509903ffa08095368495ceeb557b81842bfa52eaa8b2a3a6383 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjcyOjJGOTcxODo4MTVFMTc6QUVGQzYwOjZCMDBFNDBGIiwidmlzaXRvcl9pZCI6IjU5NjQ2NDY3NTk0ODkxMzY3OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f04ffd8986fe9284887f547a921e0df77cd5cd1cefd9fb4d4ec8ed42f1a11a72 |
| hovercard-subject-tag | issue:316065407 |
| 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/23551/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7360a2130cf176333345262504e6342599f66f4fa9a96b298df4ddcfca5b6c30/microsoft/TypeScript/issues/23551 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7360a2130cf176333345262504e6342599f66f4fa9a96b298df4ddcfca5b6c30/microsoft/TypeScript/issues/23551 |
| og:image:alt | TypeScript Version: 2.8.1 Search Terms: extend WeakMap, WeakSet, "Base constructors must all have the same return type." Code class ColorMap extends WeakMap { constructor(color) { super(); } } Type... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | zombie |
| hostname | github.com |
| expected-hostname | github.com |
| None | 27088b6977484d0d3321d9a11c907c6d6637b315cfa359ef7952dbf6292f9b14 |
| 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 | 624179fb8b88d26ba5bba08894eb60a1c5a1d93d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width