Title: Error: Class incorrectly extends base class... cannot assign type · Issue #2073 · microsoft/TypeScript · GitHub
Open Graph Title: Error: Class incorrectly extends base class... cannot assign type · Issue #2073 · microsoft/TypeScript
X Title: Error: Class incorrectly extends base class... cannot assign type · Issue #2073 · microsoft/TypeScript
Description: Please see comments: interface ObjectHash { [key: string]: any; } var hash: ObjectHash; hash = { "key": "value" } declare class Model { defaults: ObjectHash; } class MyModel1 extends Model { // Okay defaults = hash; } class MyModel2 exte...
Open Graph Description: Please see comments: interface ObjectHash { [key: string]: any; } var hash: ObjectHash; hash = { "key": "value" } declare class Model { defaults: ObjectHash; } class MyModel1 extends Model { // Oka...
X Description: Please see comments: interface ObjectHash { [key: string]: any; } var hash: ObjectHash; hash = { "key": "value" } declare class Model { defaults: ObjectHash; } class MyModel1 ex...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/2073
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error: Class incorrectly extends base class... cannot assign type","articleBody":"Please see comments:\n\n``` typescript\ninterface ObjectHash {\n [key: string]: any;\n}\n\nvar hash: ObjectHash;\n\nhash = {\n \"key\": \"value\"\n}\n\ndeclare class Model {\n defaults: ObjectHash;\n}\n\nclass MyModel1 extends Model { // Okay\n defaults = hash;\n}\n\nclass MyModel2 extends Model { // Why ERROR?!\n defaults = {\n \"key\": \"value\"\n };\n}\n\nclass MyModel3 extends Model { // Okay\n defaults: ObjectHash = {\n \"key\": \"value\"\n };\n}\n```\n","author":{"url":"https://github.com/omidkrad","@type":"Person","name":"omidkrad"},"datePublished":"2015-02-19T02:44:30Z","url":"https://github.com/microsoft/TypeScript/issues/2073"}
| 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:5ddb1fa5-7058-141f-2d44-f0511a69d0dc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9698:22DB35:12EA981:1844C84:6B0111DC |
| html-safe-nonce | d1225231cbbe2b1b0799423472ae53496ddfcd7e43e4323e5134f7b1ac20999f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Njk4OjIyREIzNToxMkVBOTgxOjE4NDRDODQ6NkIwMTExREMiLCJ2aXNpdG9yX2lkIjoiNDEzNjUzNzk1NDM4NDQxNzI0NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3eb48e08b6843f7f013e547ca0cd00713cd4817c096ec5f6470a77e5ce096a95 |
| hovercard-subject-tag | issue:58161287 |
| 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/2073/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b419d348dff51eb82d1b4aaf1a3e8142bb76294e3a11291e89a7c9b8fc02ccc0/microsoft/TypeScript/issues/2073 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b419d348dff51eb82d1b4aaf1a3e8142bb76294e3a11291e89a7c9b8fc02ccc0/microsoft/TypeScript/issues/2073 |
| og:image:alt | Please see comments: interface ObjectHash { [key: string]: any; } var hash: ObjectHash; hash = { "key": "value" } declare class Model { defaults: ObjectHash; } class MyModel1 extends Model { // Oka... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | omidkrad |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| 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 | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width