René's URL Explorer Experiment


Title: Having `noImplicitAny` Not Enabled Impacts Type Inference · Issue #47294 · microsoft/TypeScript · GitHub

Open Graph Title: Having `noImplicitAny` Not Enabled Impacts Type Inference · Issue #47294 · microsoft/TypeScript

X Title: Having `noImplicitAny` Not Enabled Impacts Type Inference · Issue #47294 · microsoft/TypeScript

Description: Bug Report 🔎 Search Terms array union types type inference noImplicitAny disabled 🕗 Version & Regression Information This changed between versions 4.2.3 and 4.3.5, as before 4.3.5, type inference for the 2nd case inferred any regardless ...

Open Graph Description: Bug Report 🔎 Search Terms array union types type inference noImplicitAny disabled 🕗 Version & Regression Information This changed between versions 4.2.3 and 4.3.5, as before 4.3.5, type inference f...

X Description: Bug Report 🔎 Search Terms array union types type inference noImplicitAny disabled 🕗 Version & Regression Information This changed between versions 4.2.3 and 4.3.5, as before 4.3.5, type inferen...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Having `noImplicitAny` Not Enabled Impacts Type Inference","articleBody":"# Bug Report\r\n\r\n### 🔎 Search Terms\r\n\r\narray union types type inference noImplicitAny disabled\r\n\r\n### 🕗 Version & Regression Information\r\n\r\nThis  changed between versions `4.2.3` and `4.3.5`, as before `4.3.5`, type inference for the 2nd case inferred `any` regardless of if `noImplicitAny` was enabled. After `4.3.5`, the expected inference happens when `noImplicitAny` is enabled, but behaves as it did before `4.3.5` when `noImplicitAny` is not enabled.\r\n\r\n### ⏯ Playground Link\r\n\r\n[Playground link with relevant code](https://www.typescriptlang.org/play?noImplicitAny=false&ts=4.5.4#code/PTAEAMEsBcFMFtygIYDsAmEDWsCeTkAnWUAIwHtoALUaXAB1k2QGdRYAPRgYzkwApwLaIUioA5qAA+oVAFd4pWIQIYI8xcvABKAFDdyqYSkKFkuAIwAuUAEFT5gDzDRE6bIVLCAPlABeUABtAF0Abn1DY3hkekZ0C38TM0sAOmj6fn4YBAAaUBxcbX9fQOz4PILgvV0QCDLVTHACgmIySho6OJQ2cDR8CKNoJPMAJht7ZOcRMXFfGQmnDS9fAJDwg0HQdLiRxKJkkbSYzLKKvCK-EtP8vCqgA)\r\n\r\n### 💻 Code\r\n\r\n\u003c!-- Please post the relevant code sample here as well-->\r\n```ts\r\n// `item` and `key` are both typed as expected (`string | number` and `number` respectively)\r\nconst array1: Array\u003cstring | number> = [];\r\nconst mapped1 = array1.map((item, key) => [item, key])\r\n\r\n// `item` and `key` are both typed as `any`\r\nconst array2: Array\u003cstring> | Array\u003cnumber> = [];\r\nconst mapped2 = array2.map((item, key) => [item, key])\r\n```\r\n\r\n### 🙁 Actual behavior\r\n\r\nWhen `noImplicitAny` is not enabled in the TS config, inferred types are impacted (inferred as `any` in the above case).\r\n\r\n### 🙂 Expected behavior\r\n\r\n`noImplicitAny` shouldn't impact inferred types, or if this is expected behaviour as having this option enabled allows for better heuristics to work, then I think having it documented that this settings isn't essentially just a \"lint rule\" might be a good idea.","author":{"url":"https://github.com/joealden","@type":"Person","name":"joealden"},"datePublished":"2022-01-03T15:23:20Z","url":"https://github.com/microsoft/TypeScript/issues/47294"}

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:78ade014-9940-d516-99b6-5b9d7419174e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id99B6:2978F1:9FB78A:CFAF60:6B00E3EE
html-safe-nonce70a9e1d6e36afc98816e96360c0bb3dbec9b33ff20c542386705f149e8ab08dc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OUI2OjI5NzhGMTo5RkI3OEE6Q0ZBRjYwOjZCMDBFM0VFIiwidmlzaXRvcl9pZCI6IjI5NzgwNTEyNDE2MDg3OTkyMTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacccbf3eb1b79245122c4be7220833f98b37213db2aa73ece490fa788e88fd8394
hovercard-subject-tagissue:1092599830
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/47294/issue_layout
twitter:imagehttps://opengraph.githubassets.com/89c814b3504090aa06ba45a74e5e015e39296b9b3e6e0770dab8b16c4f2a58dd/microsoft/TypeScript/issues/47294
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/89c814b3504090aa06ba45a74e5e015e39296b9b3e6e0770dab8b16c4f2a58dd/microsoft/TypeScript/issues/47294
og:image:altBug Report 🔎 Search Terms array union types type inference noImplicitAny disabled 🕗 Version & Regression Information This changed between versions 4.2.3 and 4.3.5, as before 4.3.5, type inference f...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejoealden
hostnamegithub.com
expected-hostnamegithub.com
None27088b6977484d0d3321d9a11c907c6d6637b315cfa359ef7952dbf6292f9b14
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
release624179fb8b88d26ba5bba08894eb60a1c5a1d93d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/47294#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F47294
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%2F47294
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/47294
Reloadhttps://github.com/microsoft/TypeScript/issues/47294
Reloadhttps://github.com/microsoft/TypeScript/issues/47294
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/47294
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/47294
Having noImplicitAny Not Enabled Impacts Type Inferencehttps://github.com/microsoft/TypeScript/issues/47294#top
Working as IntendedThe behavior described is the intended behavior; this is not a bughttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Working%20as%20Intended%22
https://github.com/joealden
Joe Alden (joealden)https://github.com/joealden
on Jan 3, 2022https://github.com/microsoft/TypeScript/issues/47294#issue-1092599830
Playground link with relevant codehttps://www.typescriptlang.org/play?noImplicitAny=false&ts=4.5.4#code/PTAEAMEsBcFMFtygIYDsAmEDWsCeTkAnWUAIwHtoALUaXAB1k2QGdRYAPRgYzkwApwLaIUioA5qAA+oVAFd4pWIQIYI8xcvABKAFDdyqYSkKFkuAIwAuUAEFT5gDzDRE6bIVLCAPlABeUABtAF0Abn1DY3hkekZ0C38TM0sAOmj6fn4YBAAaUBxcbX9fQOz4PILgvV0QCDLVTHACgmIySho6OJQ2cDR8CKNoJPMAJht7ZOcRMXFfGQmnDS9fAJDwg0HQdLiRxKJkkbSYzLKKvCK-EtP8vCqgA
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
Needs InvestigationThis issue needs a team member to investigate its status.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Investigation%22
on Jan 6, 2022https://github.com/microsoft/TypeScript/issues/47294#event-5854432447
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Jan 6, 2022https://github.com/microsoft/TypeScript/issues/47294#issuecomment-1006919286
Playground link with noImplicitAny disabledhttps://www.typescriptlang.org/play?strict=false&noImplicitAny=false&ts=4.5.4#code/FAMwrgdgxgLglgewgAhAhBGAFCCBBAJwIEMBPDALmUJNIB4BnGAuCAc2QB9kIwBbAEYBTAgD4AlMgDewZHOQB6BcgAGcGEL4rkxCABNVAayGltxAkOQCEMABbIYpAA5CDxBsiEAPF7FfIsFSYWdi4efmECM31VXkERFXFZeSgkJmQ+YicXPQxkAF5UfCIyDAA6TKcsLHVNABpkY1JJfNFkAG1avgamgF0kgF9gUEhYRBQ0BAAmHGLaKaoaMkZmVjY27iX6OMiJaWS5JVUu6IMVJrMLKxt7RxydDxVdUwPkVIh0ypypgqKtqYqWWqXR6JhabU6Gm6jRM-WAAyAA
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
on Jan 6, 2022https://github.com/microsoft/TypeScript/issues/47294#event-5854440696
https://github.com/ahejlsberg
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
on Jan 11, 2022https://github.com/microsoft/TypeScript/issues/47294#issuecomment-1010310074
#42620https://github.com/microsoft/TypeScript/pull/42620
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
Working as IntendedThe behavior described is the intended behavior; this is not a bughttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Working%20as%20Intended%22
Needs InvestigationThis issue needs a team member to investigate its status.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Investigation%22
on Jan 11, 2022https://github.com/microsoft/TypeScript/issues/47294#event-5875917282
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Jan 11, 2022https://github.com/microsoft/TypeScript/issues/47294#issuecomment-1010312524
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
on Jan 13, 2022https://github.com/microsoft/TypeScript/issues/47294#event-5888090496
https://github.com/typescript-bot
TypeScript Bot (typescript-bot)https://github.com/typescript-bot
on Jan 15, 2022https://github.com/microsoft/TypeScript/issues/47294#issuecomment-1013745509
TypeScript Bot (typescript-bot)https://github.com/typescript-bot
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jan 15, 2022https://github.com/microsoft/TypeScript/issues/47294#event-5899446250
microsofthttps://github.com/microsoft
on Oct 22, 2025https://github.com/microsoft/TypeScript/issues/47294#event-20417482333
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/47294
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/47294
Working as IntendedThe behavior described is the intended behavior; this is not a bughttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Working%20as%20Intended%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.