Title: Design Meeting Notes, 1/6/2017 · Issue #13331 · microsoft/TypeScript · GitHub
Open Graph Title: Design Meeting Notes, 1/6/2017 · Issue #13331 · microsoft/TypeScript
X Title: Design Meeting Notes, 1/6/2017 · Issue #13331 · microsoft/TypeScript
Description: Instanceof requires callable or constructable right-hand side PR: #12728 what about Symbol.hasInstance? not now, maybe later The underlying code in #12709 is wrong. overriding the toString makes the class not an Object. will cause issues...
Open Graph Description: Instanceof requires callable or constructable right-hand side PR: #12728 what about Symbol.hasInstance? not now, maybe later The underlying code in #12709 is wrong. overriding the toString makes th...
X Description: Instanceof requires callable or constructable right-hand side PR: #12728 what about Symbol.hasInstance? not now, maybe later The underlying code in #12709 is wrong. overriding the toString makes th...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/13331
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design Meeting Notes, 1/6/2017","articleBody":"# Instanceof requires callable or constructable right-hand side\r\n\r\n* PR: https://github.com/Microsoft/TypeScript/pull/12728\r\n\r\n- what about `Symbol.hasInstance`?\r\n - not now, maybe later\r\n- The underlying code in https://github.com/Microsoft/TypeScript/issues/12709 is wrong. overriding the `toString` makes the class not an `Object`. will cause issues other than this.\r\n- looks like a good change.\r\n\r\n\r\n# interfaces, spread and own/enumerable properties\r\n\r\n* https://github.com/Microsoft/TypeScript/issues/13148#issuecomment-270204165\r\n\r\n- works as designed\r\n- users do not find this intuitive, and when they see the behavior perceive it as a bug\r\n- conclusion: \r\n - only filter methods if we know they come from a class. otherwise keep them (i.e. object literals and interfaces).\r\n - may need to have annotations in the future to track enumrability on interface property declarations\r\n\r\n# Configurable errors in JS\r\n\r\n* issue: https://github.com/Microsoft/TypeScript/issues/6802\r\n\r\n- allow types annotations in JS files\r\n - some sort of marker\r\n - the marker should say if you want errors\r\n - the marker should also say if type annotations are allowed\r\n - motivation, use tsc as a checker for your .js files, use other transpiler like babel to transform the code\r\n\r\n- some rule proposal:\r\n - in a .js file\r\n - Always error on interfaces, types, namespaces, enums, or any TS-specific constructs\r\n - Marker to opt-in error reporting, types and type annotations\r\n - namespaces and enums should not be allowed here\r\n - Always use JSDoc\r\n - type annotations always win over JSDoc\r\n - Always show syntax errors\r\n\r\n - what errors should here:\r\n - all?\r\n - ppl look for a linter mode\r\n - we need to configure these errors to make sure we error on permissiveness, e.g.\r\n - we do not want to make types configurable:\r\n - we need to define a taxonomy for errors\r\n - report errors the same way\r\n - commit to maintaining error codes consistent for ever\r\n - if we ever change anythign about error codes, or when they are raised, we break ppl's builds\r\n - C++ and C# struggled with allowing disabling specific errors\r\n\r\n - is it a design goal to get to a 0 errors in a .js file without using type annotations?\r\n - obviously syntax and early errors should be allowed\r\n - we need to enable it first, then see what happened..\r\n - we can use comments on lines to disable errors on a specific lines/region\r\n - but most linters have that ability to disable specific errors\r\n\r\n - we need to enable it for all files, or specific file by file to allow ppl to move from one file to another\r\n\r\n - should strict-null-checks be on by default?\r\n - there is value here\r\n - users will have to write type annotations \r\n - what about users who want to write a pure JS?\r\n - .d.ts files are always allowed to provide additional type information\r\n\r\n - `checkJS` as a new flag to allow errors in all .js files\r\n","author":{"url":"https://github.com/mhegazy","@type":"Person","name":"mhegazy"},"datePublished":"2017-01-06T21:42:02Z","url":"https://github.com/microsoft/TypeScript/issues/13331"}
| 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:766b8099-c39f-e7e0-cb36-66fef6970419 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8054:1D20B7:2227780:2B501C4:6B01B160 |
| html-safe-nonce | a74f39d8a672eba05105f498fb3bedd692ffdae11a8148212d4ec5fae4cc88ac |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDU0OjFEMjBCNzoyMjI3NzgwOjJCNTAxQzQ6NkIwMUIxNjAiLCJ2aXNpdG9yX2lkIjoiMzc3MTY1NDY5MTMxMDY0NTYwMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 68b7187c624c735b44fcbcc4824050df400eb957929a74a3f476ba18148d2bbc |
| hovercard-subject-tag | issue:199296179 |
| 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/13331/issue_layout |
| twitter:image | https://opengraph.githubassets.com/af8a44adf07868e586083eceb3b0dcdb64774177acd4a82a6ba26669d10b94c2/microsoft/TypeScript/issues/13331 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/af8a44adf07868e586083eceb3b0dcdb64774177acd4a82a6ba26669d10b94c2/microsoft/TypeScript/issues/13331 |
| og:image:alt | Instanceof requires callable or constructable right-hand side PR: #12728 what about Symbol.hasInstance? not now, maybe later The underlying code in #12709 is wrong. overriding the toString makes th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mhegazy |
| 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 | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width