René's URL Explorer Experiment


Title: Suggestion: a built-in TypedArray interface · Issue #15402 · microsoft/TypeScript · GitHub

Open Graph Title: Suggestion: a built-in TypedArray interface · Issue #15402 · microsoft/TypeScript

X Title: Suggestion: a built-in TypedArray interface · Issue #15402 · microsoft/TypeScript

Description: I would have expected a TypedArray interface to exist in the built-in declaration libraries. Instead, there are independent types for Int8Array, etc, with no common base type. interface Int8Array { /* ... */ } interface Int8ArrayConstruc...

Open Graph Description: I would have expected a TypedArray interface to exist in the built-in declaration libraries. Instead, there are independent types for Int8Array, etc, with no common base type. interface Int8Array {...

X Description: I would have expected a TypedArray interface to exist in the built-in declaration libraries. Instead, there are independent types for Int8Array, etc, with no common base type. interface Int8Array {...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Suggestion: a built-in TypedArray interface","articleBody":"I would have expected a [`TypedArray`][ecma-typed-array] interface to exist in\r\nthe built-in declaration libraries. Instead, there are independent types for\r\n[`Int8Array`][lib-int8-array], etc, with no common base type.\r\n\r\n```ts\r\ninterface Int8Array { /* ... */ }\r\ninterface Int8ArrayConstructor { /* ... */ }\r\ndeclare const Int8Array: Int8ArrayConstructor;\r\n\r\ninterface Uint8Array { /* ... */ }\r\ninterface Uint8ArrayConstructor { /* ... */ }\r\ndeclare const Uint8Array: Uint8ArrayConstructor;\r\n\r\n// ...\r\n```\r\n\r\nIt seems sensible that there should be a common `TypedArray` type, both because\r\n\r\n  - a TypeScript user might want to declare a variable as a `TypedArray`, and\r\n  - it would reduce repetition in the built-in declaration files\r\n\r\n```ts\r\ninterface TypedArray { /* ... */ }\r\n\r\ninterface Int8Array extends TypedArray { }\r\ninterface Int8ArrayConstructor { /* ... */ }\r\ndeclare const Int8Array: Int8ArrayConstructor;\r\n\r\ninterface Uint8Array extends TypedArray { }\r\ninterface Uint8ArrayConstructor { /* ... */ }\r\ndeclare const Uint8Array: Uint8ArrayConstructor;\r\n\r\n// ...\r\n```\r\n\r\nIs there a good reason why there is no `TypedArray` type? If not, I can submit a PR.\r\n\r\n## Use case\r\n\r\nConsider the [`isTypedArray()`][lodash-is-typed-array] function from lodash.\r\nCurrently, it is declared as follows:\r\n\r\n```ts\r\nfunction isTypedArray(value: any): boolean;\r\n```\r\n\r\nThis proposal would enable an appropriate type-guard, without declaring\r\na convoluted union type:\r\n\r\n```ts\r\nfunction isTypedArray(value: any): value is TypedArray;\r\n```\r\n\r\n[ecma-typed-array]: http://www.ecma-international.org/ecma-262/6.0/#sec-typedarray-objects\r\n[lib-int8-array]: https://github.com/Microsoft/TypeScript/blob/6756e3e44c3b21d021a7542b63f2de84b65695c4/src/lib/es5.d.ts#L1550\r\n[lodash-is-typed-array]: https://lodash.com/docs/4.17.4#isTypedArray\r\n","author":{"url":"https://github.com/mcmath","@type":"Person","name":"mcmath"},"datePublished":"2017-04-26T20:58:15Z","url":"https://github.com/microsoft/TypeScript/issues/15402"}

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:9f854952-64d5-7a0d-05ac-21b152c21c0e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id94FA:2F9718:AF5BF0:EC473E:6B00F6C2
html-safe-nonce0139064e762c9bfe7dd97943adb046553e996750f77eb18e0014874ceb03a2ea
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NEZBOjJGOTcxODpBRjVCRjA6RUM0NzNFOjZCMDBGNkMyIiwidmlzaXRvcl9pZCI6IjgxNjY1NjAzOTkxODIzNzM3OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaca7170b7cd2da65359ff09538436250ea2949e9f75dc3c5dbeba76340ca8e55bd
hovercard-subject-tagissue:224597303
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/15402/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3a5faa13425359bc9c126f6d6b4794575ea7404bd94eba109176610573a1c58e/microsoft/TypeScript/issues/15402
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3a5faa13425359bc9c126f6d6b4794575ea7404bd94eba109176610573a1c58e/microsoft/TypeScript/issues/15402
og:image:altI would have expected a TypedArray interface to exist in the built-in declaration libraries. Instead, there are independent types for Int8Array, etc, with no common base type. interface Int8Array {...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemcmath
hostnamegithub.com
expected-hostnamegithub.com
None4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc
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
release9983dd5da06943f833c971dd5b6bc988e2858be5
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/15402#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F15402
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%2F15402
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/15402
Reloadhttps://github.com/microsoft/TypeScript/issues/15402
Reloadhttps://github.com/microsoft/TypeScript/issues/15402
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/15402
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/15402
Suggestion: a built-in TypedArray interfacehttps://github.com/microsoft/TypeScript/issues/15402#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
Backloghttps://github.com/microsoft/TypeScript/milestone/29
https://github.com/mcmath
Akim McMath (mcmath)https://github.com/mcmath
on Apr 26, 2017https://github.com/microsoft/TypeScript/issues/15402#issue-224597303
TypedArrayhttp://www.ecma-international.org/ecma-262/6.0/#sec-typedarray-objects
Int8Arrayhttps://github.com/Microsoft/TypeScript/blob/6756e3e44c3b21d021a7542b63f2de84b65695c4/src/lib/es5.d.ts#L1550
isTypedArray()https://lodash.com/docs/4.17.4#isTypedArray
Nexthttps://github.com/microsoft/TypeScript/issues/15402?timeline_page=1
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Apr 26, 2017https://github.com/microsoft/TypeScript/issues/15402#issuecomment-297544403
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%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
Accepting PRshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Accepting%20PRs%22
on Apr 26, 2017https://github.com/microsoft/TypeScript/issues/15402#event-1059404141
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Apr 26, 2017https://github.com/microsoft/TypeScript/issues/15402#event-1059404282
https://github.com/mcmath
Akim McMath (mcmath)https://github.com/mcmath
on Apr 26, 2017https://github.com/microsoft/TypeScript/issues/15402#issuecomment-297552155
Mohamed Hegazy (@mhegazy)https://github.com/mhegazy
Akim McMath (mcmath)https://github.com/mcmath
on Apr 27, 2017https://github.com/microsoft/TypeScript/issues/15402#event-1059686679
Add TypedArray interfacehttps://github.com/mcmath/TypeScript/commit/67c9ec0c3d59ce52aeace11bfb6dc8e1fe4c195a
https://docs.github.com/articles/closing-issues-via-commit-messages
67c9ec0https://github.com/mcmath/TypeScript/commit/67c9ec0c3d59ce52aeace11bfb6dc8e1fe4c195a
https://github.com/marcusjwhelan
Marcus (marcusjwhelan)https://github.com/marcusjwhelan
on Apr 27, 2017https://github.com/microsoft/TypeScript/issues/15402#issuecomment-297714356
https://github.com/mcmath
Akim McMath (mcmath)https://github.com/mcmath
on Apr 27, 2017https://github.com/microsoft/TypeScript/issues/15402#issuecomment-297735498
Marcus (@marcusjwhelan)https://github.com/marcusjwhelan
https://github.com/saschanaz
Kagami Sascha Rosylight (saschanaz)https://github.com/saschanaz
on May 7, 2017https://github.com/microsoft/TypeScript/issues/15402#issuecomment-299702084
Web IDLhttps://heycam.github.io/webidl/#common
https://github.com/ulrikstrid
Ulrik Strid (ulrikstrid)https://github.com/ulrikstrid
on Jun 12, 2017https://github.com/microsoft/TypeScript/issues/15402#issuecomment-307812355
Mohamed Hegazy (@mhegazy)https://github.com/mhegazy
https://github.com/zenmumbler
zenmumblerhttps://github.com/zenmumbler
on Jun 23, 2017https://github.com/microsoft/TypeScript/issues/15402#issuecomment-310707196
https://github.com/stardazed/stardazed/blob/master/src/core/array.ts#L36https://github.com/stardazed/stardazed/blob/master/src/core/array.ts#L36
https://github.com/stardazed/veclibhttps://github.com/stardazed/veclib
Adrian Leonhard (NaridaL)https://github.com/NaridaL
on Sep 18, 2017https://github.com/microsoft/TypeScript/issues/15402#event-1254221544
Refactored typed arrays.https://github.com/NaridaL/TypeScript/commit/359c676879a669b9dca4ca5ffb3ffbc2a7681bfa
https://docs.github.com/articles/closing-issues-via-commit-messages
359c676https://github.com/NaridaL/TypeScript/commit/359c676879a669b9dca4ca5ffb3ffbc2a7681bfa
Refactored typed arrays.https://github.com/NaridaL/TypeScript/commit/e7ae25221e97f6e3d8bd635a6e5000617241e7ff
https://docs.github.com/articles/closing-issues-via-commit-messages
e7ae252https://github.com/NaridaL/TypeScript/commit/e7ae25221e97f6e3d8bd635a6e5000617241e7ff
Refactored typed arrays.https://github.com/NaridaL/TypeScript/commit/fc79d8504b7a5cbb286acbe54ba867e02df1e4a3
https://docs.github.com/articles/closing-issues-via-commit-messages
fc79d85https://github.com/NaridaL/TypeScript/commit/fc79d8504b7a5cbb286acbe54ba867e02df1e4a3
https://github.com/corwin-of-amber
Shachar Itzhaky (corwin-of-amber)https://github.com/corwin-of-amber
on Oct 31, 2019https://github.com/microsoft/TypeScript/issues/15402#issuecomment-548459634
https://github.com/vladshcherbin
Vlad Shcherbin (vladshcherbin)https://github.com/vladshcherbin
on May 5, 2020https://github.com/microsoft/TypeScript/issues/15402#issuecomment-623952635
fs.writeFilehttps://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback
TypeScript Bot (typescript-bot)https://github.com/typescript-bot
Fix AvailableA PR has been opened for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fix%20Available%22
on Dec 31, 2021https://github.com/microsoft/TypeScript/issues/15402#event-5829415525
https://github.com/tophf
tophf (tophf)https://github.com/tophf
on Nov 11, 2022https://github.com/microsoft/TypeScript/issues/15402#issuecomment-1311983383
standard built-in type per JS specificationhttps://tc39.es/ecma262/multipage/indexed-collections.html#sec-typedarray-objects
https://github.com/FergoTheGreat
FergoTheGreathttps://github.com/FergoTheGreat
on Jul 18, 2023https://github.com/microsoft/TypeScript/issues/15402#issuecomment-1639184808
Mark Fulton (mfulton26)https://github.com/mfulton26
on Jul 9, 2024https://github.com/microsoft/TypeScript/issues/15402#event-13444000577
feat(lib): define TypedArray interfacehttps://github.com/mfulton26/TypeScript/commit/1b2a0c000de2d6dcb7eae39c217c166088099260
https://docs.github.com/articles/closing-issues-via-commit-messages
1b2a0c0https://github.com/mfulton26/TypeScript/commit/1b2a0c000de2d6dcb7eae39c217c166088099260
feat(lib): define TypedArray interfacehttps://github.com/mfulton26/TypeScript/commit/a6c56efb787ea7287dafacd108691f1a7cac9b78
https://docs.github.com/articles/closing-issues-via-commit-messages
a6c56efhttps://github.com/mfulton26/TypeScript/commit/a6c56efb787ea7287dafacd108691f1a7cac9b78
feat(lib): define TypedArray interfacehttps://github.com/mfulton26/TypeScript/commit/67e122fb2f822ddd5168e29556e45d5b0de33eb8
https://docs.github.com/articles/closing-issues-via-commit-messages
67e122fhttps://github.com/mfulton26/TypeScript/commit/67e122fb2f822ddd5168e29556e45d5b0de33eb8
feat(lib): define TypedArray interfacehttps://github.com/mfulton26/TypeScript/commit/49d6fbf3b99f3ae800b7a1d843885be7737de61d
https://docs.github.com/articles/closing-issues-via-commit-messages
49d6fbfhttps://github.com/mfulton26/TypeScript/commit/49d6fbf3b99f3ae800b7a1d843885be7737de61d
https://github.com/petamoriken
Kenta Moriuchi (petamoriken)https://github.com/petamoriken
on Oct 15, 2024https://github.com/microsoft/TypeScript/issues/15402#issuecomment-2414599484
denoland/deno#26129 (comment)https://github.com/denoland/deno/issues/26129#issuecomment-2411851497
https://github.com/kyr0
Aron Homberg (kyr0)https://github.com/kyr0
on Jan 16, 2025https://github.com/microsoft/TypeScript/issues/15402#issuecomment-2596173471
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#constructorhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#constructor
https://github.com/BlackAsLight
Doctor (BlackAsLight)https://github.com/BlackAsLight
on Aug 3, 2025https://github.com/microsoft/TypeScript/issues/15402#issuecomment-3148287607
Jake Bailey (jakebailey)https://github.com/jakebailey
Fix AvailableA PR has been opened for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fix%20Available%22
on Aug 20, 2026https://github.com/microsoft/TypeScript/issues/15402#event-29770219889
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Help Wantedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Help%20Wanted%22
on Nov 10, 2026https://github.com/microsoft/TypeScript/issues/15402#event-35721421291
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/15402
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/15402
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
BacklogNo due datehttps://github.com/microsoft/TypeScript/milestone/29
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.