Title: Void method in if clause · Issue #10942 · microsoft/TypeScript · GitHub
Open Graph Title: Void method in if clause · Issue #10942 · microsoft/TypeScript
X Title: Void method in if clause · Issue #10942 · microsoft/TypeScript
Description: TypeScript Version: 1.8.0 Is it a bug? Code class fsClass { exists(path: string, cb?: (exists: boolean) => void): void { } } var fs = new fsClass(); if(fs.exists("")){ } Expected behavior: Raise an error telling a void type is not permit...
Open Graph Description: TypeScript Version: 1.8.0 Is it a bug? Code class fsClass { exists(path: string, cb?: (exists: boolean) => void): void { } } var fs = new fsClass(); if(fs.exists("")){ } Expected behavior: Raise an...
X Description: TypeScript Version: 1.8.0 Is it a bug? Code class fsClass { exists(path: string, cb?: (exists: boolean) => void): void { } } var fs = new fsClass(); if(fs.exists("")){ } Expected behav...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/10942
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Void method in if clause","articleBody":"**TypeScript Version:** 1.8.0 \n\nIs it a bug?\n\n**Code**\n\n``` ts\nclass fsClass {\n exists(path: string, cb?: (exists: boolean) => void): void {\n\n }\n}\n\nvar fs = new fsClass();\n\nif(fs.exists(\"\")){\n\n}\n```\n\n**Expected behavior:**\nRaise an error telling a void type is not permitted.\n\n**Actual behavior:** \nNo error.\n","author":{"url":"https://github.com/sant123","@type":"Person","name":"sant123"},"datePublished":"2016-09-15T22:39:41Z","url":"https://github.com/microsoft/TypeScript/issues/10942"}
| 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:ac619469-4f09-0539-2edb-509e50a1ad01 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B3C2:14278D:232BBD:300A6E:6B044C63 |
| html-safe-nonce | a995d289107b58dfaadeaba7d211d94b2b850d29a6e489340f3b968bfaecf2ec |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0MyOjE0Mjc4RDoyMzJCQkQ6MzAwQTZFOjZCMDQ0QzYzIiwidmlzaXRvcl9pZCI6IjEwNDgxMzYyODMwNDM2NzkzMzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | dba989fe0346c1f746a0c5cd875f819647bf31f34b5872d96d0ec2d4649b5853 |
| hovercard-subject-tag | issue:177307333 |
| 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/10942/issue_layout |
| twitter:image | https://opengraph.githubassets.com/89b4a8bbc4fe4ecbb22ee1f52c8ccf796ef49c877b75c4855aa2b1760c98f5c7/microsoft/TypeScript/issues/10942 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/89b4a8bbc4fe4ecbb22ee1f52c8ccf796ef49c877b75c4855aa2b1760c98f5c7/microsoft/TypeScript/issues/10942 |
| og:image:alt | TypeScript Version: 1.8.0 Is it a bug? Code class fsClass { exists(path: string, cb?: (exists: boolean) => void): void { } } var fs = new fsClass(); if(fs.exists("")){ } Expected behavior: Raise an... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sant123 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 002aa6b95ffa730b0aec436a5c383f536ad677284e60056037fb120afe37b730 |
| 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 | 059f24c781e3a0d7df3f27a97da0e93fab06ae39 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width