René's URL Explorer Experiment


Title: Use discriminated unions for node categories by weswigham · Pull Request #18285 · microsoft/TypeScript · GitHub

Open Graph Title: Use discriminated unions for node categories by weswigham · Pull Request #18285 · microsoft/TypeScript

X Title: Use discriminated unions for node categories by weswigham · Pull Request #18285 · microsoft/TypeScript

Description: TypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Use discriminated unions for node categories by weswigham · Pull Request #18285 · microsoft/TypeScript

Open Graph Description: As mentioned in this comment, we can remove a lot of casts by using a discriminated union for Node. This does so, and should be considered a breaking change as such. This only removes casts from lo...

X Description: As mentioned in this comment, we can remove a lot of casts by using a discriminated union for Node. This does so, and should be considered a breaking change as such. This only removes casts from lo...

Opengraph URL: https://github.com/microsoft/TypeScript/pull/18285

X: @github

direct link

Domain: github.com

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/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:d67d0f56-f9d1-96d6-f619-81221d900ee6
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9374:14ECB:E5EEC6:1253917:6B010922
html-safe-nonceb0669dbf74034de2d69641220c1ea9cca55a307ac96b1f841c47c53b0dbfb7a0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Mzc0OjE0RUNCOkU1RUVDNjoxMjUzOTE3OjZCMDEwOTIyIiwidmlzaXRvcl9pZCI6IjYyNDIzNjcyNzg2NzU5ODY3MjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmace7c759b58f97de2c2c92a2892c08515a35f332184150d145eb3719671e83f2fe
hovercard-subject-tagpull_request:139659300
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/microsoft/TypeScript/18285/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/efdbb3968a94202c788574a100c4b1f07a778fd90922ded9cf0b2ccda231e8f5/microsoft/TypeScript/pull/18285
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/efdbb3968a94202c788574a100c4b1f07a778fd90922ded9cf0b2ccda231e8f5/microsoft/TypeScript/pull/18285
og:image:altAs mentioned in this comment, we can remove a lot of casts by using a discriminated union for Node. This does so, and should be considered a breaking change as such. This only removes casts from lo...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameweswigham
hostnamegithub.com
expected-hostnamegithub.com
Nonecb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124
turbo-cache-controlno-cache
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-namepull-requests

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/pull/18285#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fpull%2F18285
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%2Fpull%2F18285
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%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/pull/18285
Reloadhttps://github.com/microsoft/TypeScript/pull/18285
Reloadhttps://github.com/microsoft/TypeScript/pull/18285
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
Wesley Wigham (weswigham)https://github.com/weswigham
microsoft:masterhttps://github.com/microsoft/TypeScript/tree/master
weswigham:node-discriminated-unionhttps://github.com/weswigham/TypeScript/tree/node-discriminated-union
Conversationhttps://github.com/microsoft/TypeScript/pull/18285
Commits3 (3)https://github.com/microsoft/TypeScript/pull/18285/commits
Checkshttps://github.com/microsoft/TypeScript/pull/18285/checks
Files changedhttps://github.com/microsoft/TypeScript/pull/18285/files
Use discriminated unions for node categorieshttps://github.com/microsoft/TypeScript/pull/18285#top
Wesley Wigham (weswigham)https://github.com/weswigham
microsoft:masterhttps://github.com/microsoft/TypeScript/tree/master
weswigham:node-discriminated-unionhttps://github.com/weswigham/TypeScript/tree/node-discriminated-union
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
Sep 6, 2017https://github.com/microsoft/TypeScript/pull/18285#issue-255735053
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/18285
this commenthttps://github.com/Microsoft/TypeScript/pull/18214#issuecomment-326823448
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/18285
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
September 6, 2017 20:38https://github.com/microsoft/TypeScript/pull/18285#event-1237618861
https://github.com/msftclas
Microsoft Contribution License Agreements (msftclas)https://github.com/msftclas
cla-already-signed https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3Acla-already-signed
Sep 6, 2017https://github.com/microsoft/TypeScript/pull/18285#event-1237618903
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
Sep 6, 2017 https://github.com/microsoft/TypeScript/pull/18285#ref-pullrequest-251759689
Cache most calls to isRelatedTo #17950 https://github.com/microsoft/TypeScript/pull/17950
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
Breaking Change https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Breaking%20Change%22
Sep 6, 2017https://github.com/microsoft/TypeScript/pull/18285#event-1237751382
https://github.com/ajafff
Klaus Meinhardt (ajafff)https://github.com/ajafff
Sep 7, 2017https://github.com/microsoft/TypeScript/pull/18285#issuecomment-327813600
#13634https://github.com/microsoft/TypeScript/issues/13634
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/18285
https://github.com/ghost
Deleted user (ghost)https://github.com/ghost
Sep 7, 2017 https://github.com/microsoft/TypeScript/pull/18285#pullrequestreview-61243186
View reviewed changes https://github.com/microsoft/TypeScript/pull/18285/files
src/compiler/types.tshttps://github.com/microsoft/TypeScript/pull/18285/files#diff-e9fd483341eea176a38fbd370590e1dc65ce2d9bf70bfd317c5407f04dba9560
Deleted user (ghost)https://github.com/ghost
Sep 7, 2017https://github.com/microsoft/TypeScript/pull/18285#discussion_r137558715
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/18285
Wesley Wigham (weswigham)https://github.com/weswigham
Sep 7, 2017https://github.com/microsoft/TypeScript/pull/18285#discussion_r137575260
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/18285
Deleted user (ghost)https://github.com/ghost
Sep 7, 2017https://github.com/microsoft/TypeScript/pull/18285#discussion_r137582683
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/18285
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/18285
https://github.com/ghost
Deleted user (ghost)https://github.com/ghost
Sep 7, 2017https://github.com/microsoft/TypeScript/pull/18285#issuecomment-327821350
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/18285
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/18285
https://github.com/weswigham
Union types for all the thingshttps://github.com/microsoft/TypeScript/pull/18285/commits/8110b8cdd1f77c3d41cf74e59e1bc782e5aa9ac2
8110b8chttps://github.com/microsoft/TypeScript/pull/18285/commits/8110b8cdd1f77c3d41cf74e59e1bc782e5aa9ac2
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
force-pushedhttps://github.com/microsoft/TypeScript/compare/dfaa1b5e0e94ac85330e81ea67d605046d38ec89..8110b8cdd1f77c3d41cf74e59e1bc782e5aa9ac2
dfaa1b5https://github.com/microsoft/TypeScript/commit/dfaa1b5e0e94ac85330e81ea67d605046d38ec89
8110b8chttps://github.com/microsoft/TypeScript/commit/8110b8cdd1f77c3d41cf74e59e1bc782e5aa9ac2
Compare https://github.com/microsoft/TypeScript/compare/dfaa1b5e0e94ac85330e81ea67d605046d38ec89..8110b8cdd1f77c3d41cf74e59e1bc782e5aa9ac2
September 7, 2017 18:23https://github.com/microsoft/TypeScript/pull/18285#event-1239336827
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
Sep 12, 2017 https://github.com/microsoft/TypeScript/pull/18285#ref-issue-254883417
Returning union of interfaces and conditional parameters #18230 https://github.com/microsoft/TypeScript/issues/18230
https://github.com/msftgits
Microsoft GitHub User (msftgits)https://github.com/msftgits
cla-already-signed https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3Acla-already-signed
Sep 26, 2017https://github.com/microsoft/TypeScript/pull/18285#event-1265566323
https://github.com/weswigham
Merge branch 'master' into node-discriminated-unionhttps://github.com/microsoft/TypeScript/pull/18285/commits/1af97a701315dbadd53f3f06c74e3fb5df67ec95
1af97a7https://github.com/microsoft/TypeScript/pull/18285/commits/1af97a701315dbadd53f3f06c74e3fb5df67ec95
Wesley Wigham (weswigham)https://github.com/weswigham
Oct 11, 2017 https://github.com/microsoft/TypeScript/pull/18285#ref-commit-be7deb8
https://github.com/weswigham
Fix incorrect cast targethttps://github.com/microsoft/TypeScript/commit/be7deb8f015266d345db510e10ad3bf21206adbf
be7deb8https://github.com/microsoft/TypeScript/commit/be7deb8f015266d345db510e10ad3bf21206adbf
#18285https://github.com/microsoft/TypeScript/pull/18285
https://github.com/weswigham
Fix invalid cast, accept API baselineshttps://github.com/microsoft/TypeScript/pull/18285/commits/28143c013e07c5d22591685e17e2dca9ce13c133
28143c0https://github.com/microsoft/TypeScript/pull/18285/commits/28143c013e07c5d22591685e17e2dca9ce13c133
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
Oct 11, 2017 https://github.com/microsoft/TypeScript/pull/18285#ref-pullrequest-264428462
Fix incorrect cast target #19093 https://github.com/microsoft/TypeScript/pull/19093
Wesley Wigham (weswigham)https://github.com/weswigham
Oct 11, 2017 https://github.com/microsoft/TypeScript/pull/18285#ref-commit-9f4130b
https://github.com/weswigham
Fix incorrect cast target (https://github.com/microsoft/TypeScript/commit/9f4130b204024f33cdc6c8ecafebb70edd7fb4ac
#19093https://github.com/microsoft/TypeScript/pull/19093
)https://github.com/microsoft/TypeScript/commit/9f4130b204024f33cdc6c8ecafebb70edd7fb4ac
9f4130bhttps://github.com/microsoft/TypeScript/commit/9f4130b204024f33cdc6c8ecafebb70edd7fb4ac
#18285https://github.com/microsoft/TypeScript/pull/18285
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
Nov 9, 2017https://github.com/microsoft/TypeScript/pull/18285#issuecomment-343006115
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/18285
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
Nov 9, 2017https://github.com/microsoft/TypeScript/pull/18285#event-1333019035
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
Nov 9, 2017https://github.com/microsoft/TypeScript/pull/18285#issuecomment-343094266
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/18285
https://github.com/microsoft
Microsoft (microsoft)https://github.com/microsoft
Jun 14, 2018https://github.com/microsoft/TypeScript/pull/18285#event-1682130234
https://github.co/hiddenchars
https://github.com/microsoft/TypeScript/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fpull%2F18285
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser) https://github.com/DanielRosenwasser
https://github.com/ahejlsberg
Anders Hejlsberg (ahejlsberg) https://github.com/ahejlsberg
https://github.com/mhegazy
Mohamed Hegazy (mhegazy) https://github.com/mhegazy
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/18285
Breaking Change https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Breaking%20Change%22
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/18285
https://github.com/weswigham
https://github.com/ajafff
https://github.com/mhegazy
https://github.com/msftclas
https://github.com/msftgits
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.