René's URL Explorer Experiment


Title: Type guards in Array.prototype.filter · Issue #7657 · microsoft/TypeScript · GitHub

Open Graph Title: Type guards in Array.prototype.filter · Issue #7657 · microsoft/TypeScript

X Title: Type guards in Array.prototype.filter · Issue #7657 · microsoft/TypeScript

Description: TypeScript Version: nightly (1.9.0-dev.20160323) Code let numbers: number[] = [1, '2', 3, '4'].filter(x => typeof x !== 'string'); declare function isNumber(arg: any): arg is number; let numbers2: number[] = [1, '2', 3, '4'].filter(isNum...

Open Graph Description: TypeScript Version: nightly (1.9.0-dev.20160323) Code let numbers: number[] = [1, '2', 3, '4'].filter(x => typeof x !== 'string'); declare function isNumber(arg: any): arg is number; let numbers2: ...

X Description: TypeScript Version: nightly (1.9.0-dev.20160323) Code let numbers: number[] = [1, '2', 3, '4'].filter(x => typeof x !== 'string'); declare function isNumber(arg: any): ar...

Opengraph URL: https://github.com/microsoft/TypeScript/issues/7657

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Type guards in Array.prototype.filter","articleBody":"**TypeScript Version:** \n\nnightly (1.9.0-dev.20160323)\n\n**Code**\n\n``` ts\nlet numbers: number[] =\n    [1, '2', 3, '4'].filter(x => typeof x !== 'string');\n\ndeclare function isNumber(arg: any): arg is number;\nlet numbers2: number[] = [1, '2', 3, '4'].filter(isNumber);\n```\n\n[Playground](http://www.typescriptlang.org/Playground#src=let%20numbers%3A%20number%5B%5D%20%3D%0A%20%20%20%20%5B1%2C%20'2'%2C%203%2C%20'4'%5D.filter%28x%20%3D%3E%20typeof%20x%20!%3D%3D%20'string'%29%3B%0A%0Adeclare%20function%20isNumber%28arg%3A%20any%29%3A%20arg%20is%20number%3B%0Alet%20numbers2%3A%20number%5B%5D%20%3D%20%5B1%2C%20'2'%2C%203%2C%20'4'%5D.filter%28isNumber%29%3B)\n\n**Expected behavior:**\n.filter with a type guard returns an array of the specified type. This would be especially useful with `--strictNullChecks`, so we could do something like `foo.map(maybeReturnsNull).filter(x => x != null)....`\n\n**Actual behavior:** \n.filter returns an array of the same type, and the two `let`s above are errors.\n","author":{"url":"https://github.com/calebegg","@type":"Person","name":"calebegg"},"datePublished":"2016-03-23T17:07:24Z","url":"https://github.com/microsoft/TypeScript/issues/7657"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0c306c3f-bfae-5936-fbeb-1d6d488ee8c7
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEDE0:14F601:113C3C4:16087C3:6B0104A9
html-safe-nonce04effbffc0b322c183716e1f9d536407530d6614bfe0bf9cd25927e7be9d64d7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFREUwOjE0RjYwMToxMTNDM0M0OjE2MDg3QzM6NkIwMTA0QTkiLCJ2aXNpdG9yX2lkIjoiODAwNTE2Mzc1NDA4MzkxMDgyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac24c7c39a921ccf9767da2f0b683c78ab574b83e9f9bfd0aabc26ce1905094aab
hovercard-subject-tagissue:143021695
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/7657/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e4fefe88239d094ce42c0f88167fdc8c981140b7f87c5c84a094e4f327522fa7/microsoft/TypeScript/issues/7657
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e4fefe88239d094ce42c0f88167fdc8c981140b7f87c5c84a094e4f327522fa7/microsoft/TypeScript/issues/7657
og:image:altTypeScript Version: nightly (1.9.0-dev.20160323) Code let numbers: number[] = [1, '2', 3, '4'].filter(x => typeof x !== 'string'); declare function isNumber(arg: any): arg is number; let numbers2: ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamecalebegg
hostnamegithub.com
expected-hostnamegithub.com
Nonecb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124
turbo-cache-controlno-preview
go-importgithub.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id20929025
octolytics-dimension-repository_nwomicrosoft/TypeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20929025
octolytics-dimension-repository_network_root_nwomicrosoft/TypeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/7657#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F7657
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F7657
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/7657
Reloadhttps://github.com/microsoft/TypeScript/issues/7657
Reloadhttps://github.com/microsoft/TypeScript/issues/7657
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests309 (309)https://github.com/microsoft/TypeScript/pulls
Actionshttps://github.com/microsoft/TypeScript/actions
Projectshttps://github.com/microsoft/TypeScript/projects
Wikihttps://github.com/microsoft/TypeScript/wiki
Security and qualityhttps://github.com/microsoft/TypeScript/security
Insightshttps://github.com/microsoft/TypeScript/insights
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/7657
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/7657
Type guards in Array.prototype.filterhttps://github.com/microsoft/TypeScript/issues/7657#top
Domain: lib.d.tsThe issue relates to the different libraries shipped with TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20lib.d.ts%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
https://github.com/calebegg
Caleb Eggensperger (calebegg)https://github.com/calebegg
on Mar 23, 2016https://github.com/microsoft/TypeScript/issues/7657#issue-143021695
Playgroundhttp://www.typescriptlang.org/Playground#src=let%20numbers%3A%20number%5B%5D%20%3D%0A%20%20%20%20%5B1%2C%20'2'%2C%203%2C%20'4'%5D.filter%28x%20%3D%3E%20typeof%20x%20!%3D%3D%20'string'%29%3B%0A%0Adeclare%20function%20isNumber%28arg%3A%20any%29%3A%20arg%20is%20number%3B%0Alet%20numbers2%3A%20number%5B%5D%20%3D%20%5B1%2C%20'2'%2C%203%2C%20'4'%5D.filter%28isNumber%29%3B
Nexthttps://github.com/microsoft/TypeScript/issues/7657?timeline_page=1
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
Needs ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Proposal%22
In DiscussionNot yet reached consensushttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22In%20Discussion%22
Domain: lib.d.tsThe issue relates to the different libraries shipped with TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20lib.d.ts%22
Needs ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Proposal%22
on Mar 23, 2016https://github.com/microsoft/TypeScript/issues/7657#event-600606380
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Mar 23, 2016https://github.com/microsoft/TypeScript/issues/7657#issuecomment-200447063
https://github.com/calebegg
Caleb Eggensperger (calebegg)https://github.com/calebegg
on Mar 23, 2016https://github.com/microsoft/TypeScript/issues/7657#issuecomment-200536288
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Mar 24, 2016https://github.com/microsoft/TypeScript/issues/7657#issuecomment-200592812
https://github.com/NoelAbrahams
Noel Abrahams (NoelAbrahams)https://github.com/NoelAbrahams
on Mar 24, 2016https://github.com/microsoft/TypeScript/issues/7657#issuecomment-200747104
#2835https://github.com/microsoft/TypeScript/issues/2835
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Mar 28, 2016https://github.com/microsoft/TypeScript/issues/7657#issuecomment-202560067
#2835https://github.com/microsoft/TypeScript/issues/2835
https://github.com/bcherny
Boris Cherny (bcherny)https://github.com/bcherny
on Mar 30, 2016https://github.com/microsoft/TypeScript/issues/7657#issuecomment-203554059
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Accepting PRshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Accepting%20PRs%22
In DiscussionNot yet reached consensushttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22In%20Discussion%22
on Apr 11, 2016https://github.com/microsoft/TypeScript/issues/7657#event-623246572
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Apr 11, 2016https://github.com/microsoft/TypeScript/issues/7657#event-623246850
https://github.com/loilo
Florian Reuschel (loilo)https://github.com/loilo
on Jun 8, 2016https://github.com/microsoft/TypeScript/issues/7657#issuecomment-224716506
Ryan Cavanaugh (@RyanCavanaugh)https://github.com/RyanCavanaugh
overloading codehttps://github.com/Microsoft/TypeScript/issues/7657#issuecomment-200447063
this issue about reserved keywordshttps://github.com/Microsoft/TypeScript/issues/2536
https://github.com/josundt
josundthttps://github.com/josundt
on Nov 13, 2016https://github.com/microsoft/TypeScript/issues/7657#issuecomment-260183297
https://github.com/Arnavion
Arnav Singh (Arnavion)https://github.com/Arnavion
on Nov 13, 2016https://github.com/microsoft/TypeScript/issues/7657#issuecomment-260215039
josundthttps://github.com/josundt
#10916https://github.com/microsoft/TypeScript/pull/10916
https://github.com/OliverJAsh
Oliver Joseph Ash (OliverJAsh)https://github.com/OliverJAsh
on Nov 25, 2016https://github.com/microsoft/TypeScript/issues/7657#issuecomment-262969996
https://github.com/janslow
Jay Anslow (janslow)https://github.com/janslow
on Nov 25, 2016https://github.com/microsoft/TypeScript/issues/7657#issuecomment-263014611
https://github.com/bcherny
Boris Cherny (bcherny)https://github.com/bcherny
on Dec 7, 2016https://github.com/microsoft/TypeScript/issues/7657#issuecomment-265527781
Mohamed Hegazy (@mhegazy)https://github.com/mhegazy
Ryan Cavanaugh (@RyanCavanaugh)https://github.com/RyanCavanaugh
https://github.com/gasi
Daniel Gasienica (gasi)https://github.com/gasi
on Mar 8, 2017https://github.com/microsoft/TypeScript/issues/7657#issuecomment-284927389
as followshttp://www.typescriptlang.org/play/#src=type%20FooBar%20%3D%20Foo%20%7C%20Bar%0A%0Ainterface%20Foo%20%7B%0A%20%20%20%20type%3A%20%27Foo%27%0A%7D%0A%0Ainterface%20Bar%20%7B%0A%20%20%20%20type%3A%20%27Bar%27%0A%7D%0A%0Aconst%20fooBars%3A%20Array%3CFooBar%3E%20%3D%20%5B%0A%20%20%20%20%7B%20type%3A%20%27Foo%27%20%7D%2C%0A%20%20%20%20%7B%20type%3A%20%27Bar%27%20%7D%2C%0A%5D%0A%0Aconst%20foos%3A%20Array%3CFoo%3E%20%3D%20fooBars.filter(%0A%20%20%20%20(item)%3A%20item%20is%20Foo%20%3D%3E%20item.type%20%3D%3D%3D%20%27Foo%27%0A)
https://github.com/mvestergaard
Mathias Vestergaard (mvestergaard)https://github.com/mvestergaard
on Apr 20, 2017https://github.com/microsoft/TypeScript/issues/7657#issuecomment-295881467
this problemhttp://www.typescriptlang.org/play/index.html#src=const%20foo%20%3D%20%5B1%2C%202%2C%20undefined%2C%203%5D%3B%0D%0Afoo%0D%0A%20%20%20%20.filter(n%20%3D%3E%20n)%0D%0A%20%20%20%20.map(n%20%3D%3E%20n.toString())%3B
https://github.com/maiermic
Michael Maier (maiermic)https://github.com/maiermic
on Jul 17, 2017https://github.com/microsoft/TypeScript/issues/7657#issuecomment-315842588
#16223https://github.com/microsoft/TypeScript/pull/16223
https://github.com/calebegg
Caleb Eggensperger (calebegg)https://github.com/calebegg
on Sep 15, 2017https://github.com/microsoft/TypeScript/issues/7657#issuecomment-329830778
Michael Maier (@maiermic)https://github.com/maiermic
Playgroundhttp://www.typescriptlang.org/play/#src=%5B'a'%2C%20undefined%5D.filter((e)%3A%20e%20is%20string%20%3D%3E%20!!e)%5B0%5D.substring(0%2C%2010)%3B%0D%0A
https://github.com/maiermic
Michael Maier (maiermic)https://github.com/maiermic
on Sep 17, 2017https://github.com/microsoft/TypeScript/issues/7657#issuecomment-330060770
Caleb Eggensperger (@calebegg)https://github.com/calebegg
https://github.com/NaridaL
Adrian Leonhard (NaridaL)https://github.com/NaridaL
on Sep 18, 2017https://github.com/microsoft/TypeScript/issues/7657#issuecomment-330370549
Caleb Eggensperger (@calebegg)https://github.com/calebegg
#18562https://github.com/microsoft/TypeScript/issues/18562
https://github.com/calebegg
Caleb Eggensperger (calebegg)https://github.com/calebegg
on Sep 18, 2017https://github.com/microsoft/TypeScript/issues/7657#issuecomment-330384554
Adrian Leonhard (@NaridaL)https://github.com/NaridaL
Caleb Eggensperger (calebegg)https://github.com/calebegg
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Sep 18, 2017https://github.com/microsoft/TypeScript/issues/7657#event-1254464469
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Apr 26, 2018https://github.com/microsoft/TypeScript/issues/7657#event-1597354045
microsofthttps://github.com/microsoft
on Jul 31, 2018https://github.com/microsoft/TypeScript/issues/7657#event-1763304878
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/7657
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/7657
Domain: lib.d.tsThe issue relates to the different libraries shipped with TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20lib.d.ts%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.