René's URL Explorer Experiment


Title: Null inference of constants within callbacks · Issue #8880 · microsoft/TypeScript · GitHub

Open Graph Title: Null inference of constants within callbacks · Issue #8880 · microsoft/TypeScript

X Title: Null inference of constants within callbacks · Issue #8880 · microsoft/TypeScript

Description: TypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Null inference of constants within callbacks · Issue #8880 · microsoft/TypeScript

Open Graph Description: TypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Null inference of constants within callbacks · Issue #8880 · microsoft/TypeScript

X Description: TypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Null inference of constants within callbacks · Issue #8880 · microsoft/TypeScript

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Null inference of constants within callbacks","articleBody":"**TypeScript Version:** \n\n1.9.0-dev.20160528-1.0\n\n**Code**\n\n``` ts\nfunction printString() {\n    const myString: string|null = 'Hello';\n    if (myString == null) {\n        return;\n    }\n    setTimeout(() => {\n        console.log('String length was ' + myString.length);\n    }, 100);\n}\nprintString();\n```\n\n**Actual behavior:** \n\nWhen compiled with `--strictNullChecks`, this code fails:\n\n```\ntestcase.ts(7,44): error TS2531: Object is possibly 'null'.\n```\n\n**Expected behavior:**\n\nNull inference works fine within the immediate `printString` scope, but it's disabled inside closures.\n\nThis behavior makes sense for variables, since otherwise I could write something like this, that would make `myString` actually become null when it's read and fail:\n\n``` ts\nfunction printString() {\n    let myString: string|null = 'Hello';\n    if (myString == null) {\n        return;\n    }\n    setTimeout(() => {\n        console.log('String length was ' + myString.length);\n    }, 100);\n    myString = null;\n}\nprintString();\n```\n\nOn the other hand, constants don't allow this, so their non-nullity can be guaranteed if they were checked before the closure was declared.\n","author":{"url":"https://github.com/ntrrgc","@type":"Person","name":"ntrrgc"},"datePublished":"2016-05-28T18:44:05Z","url":"https://github.com/microsoft/TypeScript/issues/8880"}

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/:user_id/:repository/issues/:id(.:format)
route-controllerissues
route-actionshow
fetch-noncev2:d60ccc51-7fc9-9d04-0106-07867026bcb8
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB632:19114D:BF8D63:F787A8:6B00EA80
html-safe-nonce8106f175b224c5910bf669b27e79d638f7810328281b23f0ec4afb14af5af65c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjMyOjE5MTE0RDpCRjhENjM6Rjc4N0E4OjZCMDBFQTgwIiwidmlzaXRvcl9pZCI6IjE2OTc4NzQ1NDE4MzA3OTM4NTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacac78d0aaa70fc5951fed390a34ee3d69b1dda1e907d6559300c0c981ce6675c3
hovercard-subject-tagrepository:20929025
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///issues/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/microsoft/TypeScript/issues/8880
twitter:imagehttps://opengraph.githubassets.com/1f843281190b2c7429603681aa8d9fd8bf4ea097561976135e9c5d266676c0e0/microsoft/TypeScript
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1f843281190b2c7429603681aa8d9fd8bf4ea097561976135e9c5d266676c0e0/microsoft/TypeScript
og:image:altTypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Null inference of constants within callbacks · Issue #8880 · microsoft/TypeScript
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc
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
release9983dd5da06943f833c971dd5b6bc988e2858be5
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/8880#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F8880
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%2F8880
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fissues%2Fshow&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/8880
Reloadhttps://github.com/microsoft/TypeScript/issues/8880
Reloadhttps://github.com/microsoft/TypeScript/issues/8880
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/8880
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/8880
Null inference of constants within callbackshttps://github.com/microsoft/TypeScript/issues/8880#top
DuplicateAn existing issue was already createdhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Duplicate%22
https://github.com/ntrrgc
Alicia Boya García (ntrrgc)https://github.com/ntrrgc
on May 28, 2016https://github.com/microsoft/TypeScript/issues/8880#issue-157351827
https://github.com/ivogabe
Ivo Gabe de Wolff (ivogabe)https://github.com/ivogabe
on May 28, 2016https://github.com/microsoft/TypeScript/issues/8880#issuecomment-222325329
#8849https://github.com/microsoft/TypeScript/pull/8849
https://github.com/ntrrgc
Alicia Boya García (ntrrgc)https://github.com/ntrrgc
on May 28, 2016https://github.com/microsoft/TypeScript/issues/8880#issuecomment-222325421
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jun 7, 2016https://github.com/microsoft/TypeScript/issues/8880#event-684990236
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
DuplicateAn existing issue was already createdhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Duplicate%22
on Jun 7, 2016https://github.com/microsoft/TypeScript/issues/8880#event-684990368
microsofthttps://github.com/microsoft
on Jun 19, 2018https://github.com/microsoft/TypeScript/issues/8880#event-1689837503
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/8880
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/8880
DuplicateAn existing issue was already createdhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Duplicate%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.