René's URL Explorer Experiment


Title: Update documentation to mention that --strictNullChecks flag is necessary for --strictPropertyInitialization to have an effect · Issue #23659 · microsoft/TypeScript · GitHub

Open Graph Title: Update documentation to mention that --strictNullChecks flag is necessary for --strictPropertyInitialization to have an effect · Issue #23659 · microsoft/TypeScript

X Title: Update documentation to mention that --strictNullChecks flag is necessary for --strictPropertyInitialization to have an effect · Issue #23659 · microsoft/TypeScript

Description: TypeScript Version: 2.7.0 and above. Search Terms: strictNullChecks strictPropertyInitialization Code class C { foo: number; bar = "hello"; baz: boolean; constructor() { this.foo = 42; } } Expected behavior: TS documentation should menti...

Open Graph Description: TypeScript Version: 2.7.0 and above. Search Terms: strictNullChecks strictPropertyInitialization Code class C { foo: number; bar = "hello"; baz: boolean; constructor() { this.foo = 42; } } Expected...

X Description: TypeScript Version: 2.7.0 and above. Search Terms: strictNullChecks strictPropertyInitialization Code class C { foo: number; bar = "hello"; baz: boolean; constructor() { this.foo = 42; } ...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Update documentation to mention that --strictNullChecks flag is necessary for --strictPropertyInitialization to have an effect ","articleBody":"**TypeScript Version:**\r\n2.7.0 and above.\r\n\r\n**Search Terms:** \r\nstrictNullChecks strictPropertyInitialization\r\n\r\n**Code**\r\n```ts\r\nclass C {\r\n    foo: number;\r\n    bar = \"hello\";\r\n    baz: boolean;\r\n\r\n    constructor() {\r\n        this.foo = 42;\r\n    }\r\n}\r\n```\r\n\r\n**Expected behavior:**\r\nTS documentation should mention that `--strictNullChecks` flag is needed for `--strictPropertyInitialization` one to actually have an effect.\r\nThis would properly document the actual code change in this [commit](https://github.com/Microsoft/TypeScript/commit/8cbff0159df1792e7d3bd87946b99a4eed042e4c#diff-c3ed224e4daa84352f7f1abcd23e8cca) : \r\n![image](https://user-images.githubusercontent.com/3329077/39200931-d0c49416-47ed-11e8-991a-12fae9736230.png)\r\nThis was clearly mentionned in the [corresponding PR](https://github.com/Microsoft/TypeScript/pull/20075) description.\r\nAlso @mihailik [suggested that a warning could also be emitted](https://github.com/Microsoft/TypeScript/pull/20075#issuecomment-346058031). Has this been done?\r\n\r\n**Actual behavior:**\r\nThis is mentioned nowhere in the documentation.\r\nDocumentation for `--strictPropertyInitialization` is _Ensure non-undefined class properties are initialized in the constructor._.\r\nTo determine if a class property is _non-undefined_, `--strictNullChecks` flag must be turned on.\r\n\r\n**Playground Link:**\r\nhttp://www.typescriptlang.org/play/#src=class%20C%20%7B%0D%0A%20%20%20%20foo%3A%20number%3B%0D%0A%20%20%20%20bar%20%3D%20%22hello%22%3B%0D%0A%20%20%20%20baz%3A%20boolean%20%7C%20undefined%3B%0D%0A%0D%0A%20%20%20%20constructor()%20%7B%0D%0A%20%20%20%20%20%20%20%20this.foo%20%3D%2042%3B%0D%0A%20%20%20%20%7D%0D%0A%7D%0D%0A%0D%0Aconst%20foo%3A%20string%20%3D%20%22fdsf%22%3B\r\n\r\n**Related Issues:**\r\nI found no existing issue for updating the documentation about this.","author":{"url":"https://github.com/loicraux","@type":"Person","name":"loicraux"},"datePublished":"2018-04-24T16:38:46Z","url":"https://github.com/microsoft/TypeScript/issues/23659"}

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:92b1823a-07f1-ef18-4511-4a4c66476d5d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8ACE:21AC3F:9F375B:CD6A1F:6B00DF60
html-safe-nonceb99c85f2baa399204b0bb93becfaada4c31658953fa0198de86e7bd1a2640495
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QUNFOjIxQUMzRjo5RjM3NUI6Q0Q2QTFGOjZCMDBERjYwIiwidmlzaXRvcl9pZCI6IjczNDE2Njk1MDEwMjY0OTIyNTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac2b2d00e4833d835997894c23880586ce5b8c1408b3b298f9627c7bc3cf3395e7
hovercard-subject-tagissue:317306807
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/23659/issue_layout
twitter:imagehttps://opengraph.githubassets.com/bb14979249f26bacbad7808345e63abf0359ec18e8e6ec28e64e27e23d14b23e/microsoft/TypeScript/issues/23659
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/bb14979249f26bacbad7808345e63abf0359ec18e8e6ec28e64e27e23d14b23e/microsoft/TypeScript/issues/23659
og:image:altTypeScript Version: 2.7.0 and above. Search Terms: strictNullChecks strictPropertyInitialization Code class C { foo: number; bar = "hello"; baz: boolean; constructor() { this.foo = 42; } } Expected...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameloicraux
hostnamegithub.com
expected-hostnamegithub.com
None043c3f30fbcbe2c6c8e729e10cbbbc90c406546f9fbbb67c648d38f6b7d16daf
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
release5425dc24e8bd8d6fca9641a12afc984825a43875
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/23659#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F23659
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%2F23659
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/23659
Reloadhttps://github.com/microsoft/TypeScript/issues/23659
Reloadhttps://github.com/microsoft/TypeScript/issues/23659
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests308 (308)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/23659
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/23659
Update documentation to mention that --strictNullChecks flag is necessary for --strictPropertyInitialization to have an effect https://github.com/microsoft/TypeScript/issues/23659#top
https://github.com/mhegazy
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
DocsThe issue relates to how you learn TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Docs%22
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
TypeScript 2.9https://github.com/microsoft/TypeScript/milestone/67
https://github.com/loicraux
loicrauxhttps://github.com/loicraux
on Apr 24, 2018https://github.com/microsoft/TypeScript/issues/23659#issue-317306807
commithttps://github.com/Microsoft/TypeScript/commit/8cbff0159df1792e7d3bd87946b99a4eed042e4c#diff-c3ed224e4daa84352f7f1abcd23e8cca
https://user-images.githubusercontent.com/3329077/39200931-d0c49416-47ed-11e8-991a-12fae9736230.png
corresponding PRhttps://github.com/Microsoft/TypeScript/pull/20075
mihailikhttps://github.com/mihailik
suggested that a warning could also be emittedhttps://github.com/Microsoft/TypeScript/pull/20075#issuecomment-346058031
http://www.typescriptlang.org/play/#src=class%20C%20%7B%0D%0A%20%20%20%20foo%3A%20number%3B%0D%0A%20%20%20%20bar%20%3D%20%22hello%22%3B%0D%0A%20%20%20%20baz%3A%20boolean%20%7C%20undefined%3B%0D%0A%0D%0A%20%20%20%20constructor()%20%7B%0D%0A%20%20%20%20%20%20%20%20this.foo%20%3D%2042%3B%0D%0A%20%20%20%20%7D%0D%0A%7D%0D%0A%0D%0Aconst%20foo%3A%20string%20%3D%20%22fdsf%22%3Bhttp://www.typescriptlang.org/play/#src=class%20C%20%7B%0D%0A%20%20%20%20foo%3A%20number%3B%0D%0A%20%20%20%20bar%20%3D%20%22hello%22%3B%0D%0A%20%20%20%20baz%3A%20boolean%20%7C%20undefined%3B%0D%0A%0D%0A%20%20%20%20constructor()%20%7B%0D%0A%20%20%20%20%20%20%20%20this.foo%20%3D%2042%3B%0D%0A%20%20%20%20%7D%0D%0A%7D%0D%0A%0D%0Aconst%20foo%3A%20string%20%3D%20%22fdsf%22%3B
loicrauxhttps://github.com/loicraux
on Apr 24, 2018https://github.com/microsoft/TypeScript/issues/23659#event-1592096668
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Apr 24, 2018https://github.com/microsoft/TypeScript/issues/23659#issuecomment-384000966
'verifyCompilerOptions'https://github.com/Microsoft/TypeScript/blob/master/src/compiler/program.ts#L2064
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Apr 24, 2018https://github.com/microsoft/TypeScript/issues/23659#issuecomment-384001138
https://github.com/Microsoft/TypeScript-Handbookhttps://github.com/Microsoft/TypeScript-Handbook
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
help wantedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22help%20wanted%22
good first issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22good%20first%20issue%22
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
DocsThe issue relates to how you learn TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Docs%22
on Apr 24, 2018https://github.com/microsoft/TypeScript/issues/23659#event-1592108979
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Apr 24, 2018https://github.com/microsoft/TypeScript/issues/23659#event-1592109282
https://github.com/a-tarasyuk
Oleksandr Tarasiuk (a-tarasyuk)https://github.com/a-tarasyuk
on Apr 24, 2018https://github.com/microsoft/TypeScript/issues/23659#issuecomment-384017947
Mohamed Hegazy (@mhegazy)https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
on Apr 25, 2018https://github.com/microsoft/TypeScript/issues/23659#event-1594592579
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
TypeScript 2.9https://github.com/microsoft/TypeScript/milestone/67
on Apr 25, 2018https://github.com/microsoft/TypeScript/issues/23659#event-1594592649
Herrington Darkholme (HerringtonDarkholme)https://github.com/HerringtonDarkholme
on Apr 26, 2018https://github.com/microsoft/TypeScript/issues/23659#event-1596022777
Mention strictPropertyInitialization requires strictNullCheckshttps://github.com/HerringtonDarkholme/TypeScript-Handbook/commit/2ef8428c5a17e408e4e6f1b2d44b87c8fdd8d818
2ef8428https://github.com/HerringtonDarkholme/TypeScript-Handbook/commit/2ef8428c5a17e408e4e6f1b2d44b87c8fdd8d818
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
TypeScript-Handbook#755https://github.com/microsoft/TypeScript-Handbook/pull/755
on Apr 26, 2018https://github.com/microsoft/TypeScript/issues/23659#event-1596870679
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Apr 26, 2018https://github.com/microsoft/TypeScript/issues/23659#event-1596871113
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Apr 26, 2018https://github.com/microsoft/TypeScript/issues/23659#event-1597159646
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Apr 30, 2018https://github.com/microsoft/TypeScript/issues/23659#event-1602212746
microsofthttps://github.com/microsoft
on Jul 31, 2018https://github.com/microsoft/TypeScript/issues/23659#event-1763323450
Ali Piry (alipiry)https://github.com/alipiry
on Jan 5, 2020https://github.com/microsoft/TypeScript/issues/23659#event-2922404790
Mention strictPropertyInitialization requires strictNullCheckshttps://github.com/alipiry/TypeScript-Handbook/commit/8fb477f05a2ea39add49fe2bb901833eb71548d7
8fb477fhttps://github.com/alipiry/TypeScript-Handbook/commit/8fb477f05a2ea39add49fe2bb901833eb71548d7
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/23659
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/23659
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
DocsThe issue relates to how you learn TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Docs%22
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
TypeScript 2.9https://github.com/microsoft/TypeScript/milestone/67
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.