René's URL Explorer Experiment


Title: Type annotation for all exports in the module · Issue #38511 · microsoft/TypeScript · GitHub

Open Graph Title: Type annotation for all exports in the module · Issue #38511 · microsoft/TypeScript

X Title: Type annotation for all exports in the module · Issue #38511 · microsoft/TypeScript

Description: Search Terms Export, typed exports, modules, Next.js, Redwood.js Suggestion Allow a new syntax From issue #420 that will allow typing all of exports in a module. export implements { default: string foo: (bar: boolean) => number } export ...

Open Graph Description: Search Terms Export, typed exports, modules, Next.js, Redwood.js Suggestion Allow a new syntax From issue #420 that will allow typing all of exports in a module. export implements { default: string...

X Description: Search Terms Export, typed exports, modules, Next.js, Redwood.js Suggestion Allow a new syntax From issue #420 that will allow typing all of exports in a module. export implements { default: string...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Type annotation for all exports in the module","articleBody":"## Search Terms\r\nExport, typed exports, modules, Next.js, Redwood.js \r\n\r\n## Suggestion\r\nAllow a new syntax [From issue #420](https://github.com/microsoft/TypeScript/issues/420#issuecomment-52346304) that will allow typing all of exports in a module.\r\n\r\n```ts\r\nexport implements {\r\n  default: string\r\n  foo: (bar: boolean) => number\r\n}\r\n\r\nexport default \"Hello world!\";\r\nexport function foo(bar) { return 1 }\r\n```\r\n\u003c!-- removing to remove noise\r\n### Sharing \"module types\"\r\nIt should be possible to import module types\r\n\r\n```ts\r\nimport ModuleType from './module.ts';\r\n\r\ntype export = ModuleType;\r\n```\r\n\r\n### Alternative syntaxes \r\n\r\n```\r\ntype export = {}\r\n```\r\n\r\n```ts\r\nmodule type = {}\r\n```\r\n\r\n```ts\r\nexport module {}\r\n```\r\n\r\n-->\r\n\r\n\u003c!-- A summary of what you'd like to see added or changed -->\r\n\r\n## Use Cases and Examples\r\nIncreasingly frameworks are using named module exports as a way of organizing their code. For instance [Next.js](https://nextjs.org/docs/basic-features/data-fetching) is using named exports to specify things like exported component and functions for fetching data:\r\n\r\n```ts\r\nimport { PageModule } from 'next'\r\n\r\ntype Post = { title: string };\r\nexport implements PageModule\u003c{ posts: Posts[] }>;\r\n\r\nfunction Blog({ posts }) {\r\n  return (\r\n    \u003cul>\r\n      {posts.map(post => (\r\n        \u003cli>{post.title}\u003c/li>\r\n      ))}\r\n    \u003c/ul>\r\n  )\r\n}\r\n\r\nexport async function getStaticProps() {\r\n  return { props: { posts: [] } }\r\n}\r\n\r\nexport default Blog\r\n```\r\n\r\n### Frameworks relying on named export \r\n\r\n* [Next.js](https://nextjs.org/docs/basic-features/data-fetching)\r\n* [Redwood.js](https://redwoodjs.com/tutorial/side-quest-how-redwood-works-with-data)\r\n* [Remix.js](https://blog.remix.run/p/remix-preview)\r\n* [SevlteKit](https://kit.svelte.dev/)\r\n* [StroryBook](https://storybook.js.org/blog/component-story-format/)\r\n* [CloudFlare Workers](https://github.com/cloudflare/workers-types)\r\n* > please suggest more \r\n\r\n\u003c!-- Show how this would be used and what the behavior would be -->\r\n\r\n## Checklist\r\n\r\nMy suggestion meets these guidelines:\r\n\r\n* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code\r\n* [x] This wouldn't change the runtime behavior of existing JavaScript code\r\n* [x] This could be implemented without emitting different JS based on the types of the expressions\r\n* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)\r\n* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).\r\n\r\n\r\n### Related issues\r\n* https://github.com/microsoft/TypeScript/issues/420\r\n* https://github.com/microsoft/TypeScript/issues/13626","author":{"url":"https://github.com/mohsen1","@type":"Person","name":"mohsen1"},"datePublished":"2020-05-12T20:38:36Z","url":"https://github.com/microsoft/TypeScript/issues/38511"}

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:9c1c6b0a-1d06-43ae-64d5-26f2c04fad4b
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD938:157C65:1EC4F87:290E2E4:6B017849
html-safe-nonce2ac093b59c0de80d13cbcbe71e000dde6b586990708fc2ff5f72b883adf70c07
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTM4OjE1N0M2NToxRUM0Rjg3OjI5MEUyRTQ6NkIwMTc4NDkiLCJ2aXNpdG9yX2lkIjoiODAyODA1NjI5MDU0ODg3MzI4OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac6a096cb27fb9d95c5185c6a08ec86723013726c5334a9aff316cc0d87285ff26
hovercard-subject-tagissue:616944349
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/38511/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d6c8f95f98d0e48ffee66f4bebd343771a5388e8da88e081cce6a0938fa5a3ba/microsoft/TypeScript/issues/38511
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d6c8f95f98d0e48ffee66f4bebd343771a5388e8da88e081cce6a0938fa5a3ba/microsoft/TypeScript/issues/38511
og:image:altSearch Terms Export, typed exports, modules, Next.js, Redwood.js Suggestion Allow a new syntax From issue #420 that will allow typing all of exports in a module. export implements { default: string...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemohsen1
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/38511#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F38511
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%2F38511
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/38511
Reloadhttps://github.com/microsoft/TypeScript/issues/38511
Reloadhttps://github.com/microsoft/TypeScript/issues/38511
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests312 (312)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/38511
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/38511
Type annotation for all exports in the modulehttps://github.com/microsoft/TypeScript/issues/38511#top
In DiscussionNot yet reached consensushttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22In%20Discussion%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
https://github.com/mohsen1
Mohsen Azimi (mohsen1)https://github.com/mohsen1
on May 12, 2020https://github.com/microsoft/TypeScript/issues/38511#issue-616944349
From issue #420https://github.com/microsoft/TypeScript/issues/420#issuecomment-52346304
Next.jshttps://nextjs.org/docs/basic-features/data-fetching
Next.jshttps://nextjs.org/docs/basic-features/data-fetching
Redwood.jshttps://redwoodjs.com/tutorial/side-quest-how-redwood-works-with-data
Remix.jshttps://blog.remix.run/p/remix-preview
SevlteKithttps://kit.svelte.dev/
StroryBookhttps://storybook.js.org/blog/component-story-format/
CloudFlare Workershttps://github.com/cloudflare/workers-types
TypeScript's Design Goalshttps://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals
Allow a module to implement an interface #420https://github.com/microsoft/TypeScript/issues/420
Type annotations for default export #13626https://github.com/microsoft/TypeScript/issues/13626
Nexthttps://github.com/microsoft/TypeScript/issues/38511?timeline_page=1
https://github.com/balazsorban44
Balázs Orbán (balazsorban44)https://github.com/balazsorban44
on May 12, 2020https://github.com/microsoft/TypeScript/issues/38511#issuecomment-627602312
https://blog.remix.run/p/remix-previewhttps://blog.remix.run/p/remix-preview
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
In DiscussionNot yet reached consensushttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22In%20Discussion%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
on Jun 5, 2020https://github.com/microsoft/TypeScript/issues/38511#event-3413513145
https://github.com/kentcdodds
Kent C. Dodds (kentcdodds)https://github.com/kentcdodds
on Nov 29, 2021https://github.com/microsoft/TypeScript/issues/38511#issuecomment-981824966
#46942https://github.com/microsoft/TypeScript/issues/46942
https://github.com/Rich-Harris
Rich Harris (Rich-Harris)https://github.com/Rich-Harris
on Nov 30, 2021https://github.com/microsoft/TypeScript/issues/38511#issuecomment-983034156
SvelteKithttps://kit.svelte.dev
endpointhttps://kit.svelte.dev/docs#routing-endpoints
https://github.com/kentcdodds
Kent C. Dodds (kentcdodds)https://github.com/kentcdodds
on Nov 30, 2021https://github.com/microsoft/TypeScript/issues/38511#issuecomment-983047766
Rich Harris (@Rich-Harris)https://github.com/Rich-Harris
https://github.com/Rich-Harris
Rich Harris (Rich-Harris)https://github.com/Rich-Harris
on Dec 1, 2021https://github.com/microsoft/TypeScript/issues/38511#issuecomment-983151411
https://github.com/GregBrimble
Greg Brimble (GregBrimble)https://github.com/GregBrimble
on Dec 1, 2021https://github.com/microsoft/TypeScript/issues/38511#issuecomment-983556701
@cloudflare/workers-typeshttps://github.com/cloudflare/workers-types
https://github.com/geelen
Glen Maddern (geelen)https://github.com/geelen
on Dec 1, 2021https://github.com/microsoft/TypeScript/issues/38511#issuecomment-983565705
Rich Harris (@Rich-Harris)https://github.com/Rich-Harris
https://github.com/orta
Orta Therox (orta)https://github.com/orta
on Dec 8, 2021https://github.com/microsoft/TypeScript/issues/38511#issuecomment-989102804
#38713https://github.com/microsoft/TypeScript/issues/38713
#420 (comment)https://github.com/microsoft/TypeScript/issues/420#issuecomment-632338084
https://github.com/kentcdodds
Kent C. Dodds (kentcdodds)https://github.com/kentcdodds
on Dec 10, 2021https://github.com/microsoft/TypeScript/issues/38511#issuecomment-991037622
Orta Therox (@orta)https://github.com/orta
https://github.com/shilman
Michael Shilman (shilman)https://github.com/shilman
on Dec 16, 2021https://github.com/microsoft/TypeScript/issues/38511#issuecomment-996275728
Component Story Formathttps://storybook.js.org/blog/component-story-format/
https://github.com/hollandThomas
Thomas Holland (hollandThomas)https://github.com/hollandThomas
on Jan 7, 2022https://github.com/microsoft/TypeScript/issues/38511#issuecomment-1007443387
https://github.com/mohsen1
Mohsen Azimi (mohsen1)https://github.com/mohsen1
on Jan 19, 2022https://github.com/microsoft/TypeScript/issues/38511#issuecomment-1016749244
Daniel Rosenwasser (@DanielRosenwasser)https://github.com/DanielRosenwasser
it's possible to import selfhttps://github.com/microsoft/TypeScript/issues/47151#issuecomment-1015975676
https://github.com/ivanhofer
Hofer Ivan (ivanhofer)https://github.com/ivanhofer
on Mar 25, 2022https://github.com/microsoft/TypeScript/issues/38511#issuecomment-1079385092
typesafe-i18nhttps://github.com/ivanhofer/typesafe-i18n
https://github.com/kentcdodds
Kent C. Dodds (kentcdodds)https://github.com/kentcdodds
on Dec 20, 2022https://github.com/microsoft/TypeScript/issues/38511#issuecomment-1360402369
Jamie (@jamiebuilds-signal)https://github.com/jamiebuilds-signal
https://github.com/camjackson
Cam Jackson (camjackson)https://github.com/camjackson
on Dec 21, 2022https://github.com/microsoft/TypeScript/issues/38511#issuecomment-1360561693
https://github.com/ggoodman
Geoff Goodman (ggoodman)https://github.com/ggoodman
on Dec 21, 2022https://github.com/microsoft/TypeScript/issues/38511#issuecomment-1360617052
triple-slash directivehttps://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-lib-
https://github.com/btoo
btoohttps://github.com/btoo
on Dec 21, 2022https://github.com/microsoft/TypeScript/issues/38511#issuecomment-1361550813
satisfieshttps://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-9.html#the-satisfies-operator
https://github.com/ggoodman
Geoff Goodman (ggoodman)https://github.com/ggoodman
on Dec 21, 2022https://github.com/microsoft/TypeScript/issues/38511#issuecomment-1361607188
btoohttps://github.com/btoo
https://github.com/mohsen1
Mohsen Azimi (mohsen1)https://github.com/mohsen1
on Dec 23, 2022https://github.com/microsoft/TypeScript/issues/38511#issuecomment-1364104558
https://github.com/EloB
Olle Bröms (EloB)https://github.com/EloB
on Jan 23, 2023https://github.com/microsoft/TypeScript/issues/38511#issuecomment-1400977647
btoohttps://github.com/btoo
Unarray (Unarray)https://github.com/Unarray
on Feb 25, 2023https://github.com/microsoft/TypeScript/issues/38511#event-8608040733
Refactoring all projethttps://github.com/Royaume-Group/Royaume-Discord-Bot/commit/90f79c343731134fcda0c2d853a297e1268c812d
90f79c3https://github.com/Royaume-Group/Royaume-Discord-Bot/commit/90f79c343731134fcda0c2d853a297e1268c812d
https://github.com/mariusGundersen
Marius Gundersen (mariusGundersen)https://github.com/mariusGundersen
on Jun 1, 2023https://github.com/microsoft/TypeScript/issues/38511#issuecomment-1571727360
Balázs Orbán (balazsorban44)https://github.com/balazsorban44
on Feb 5, 2024https://github.com/microsoft/TypeScript/issues/38511#event-11708821666
feat(ts): expose `MiddlewareConfig` interface (#61576)https://github.com/vercel/next.js/commit/492b4157f314fb5d37a6babcbeadca5c1163cc0b
#61576https://github.com/vercel/next.js/pull/61576
492b415https://github.com/vercel/next.js/commit/492b4157f314fb5d37a6babcbeadca5c1163cc0b
https://github.com/nfroidure
Nicolas Froidure (nfroidure)https://github.com/nfroidure
on Dec 3, 2024https://github.com/microsoft/TypeScript/issues/38511#issuecomment-2514095177
https://github.com/vercel/next.js/blob/canary/packages/next/image-types/global.d.tshttps://github.com/vercel/next.js/blob/canary/packages/next/image-types/global.d.ts
handlershttps://github.com/nfroidure/whook/blob/main/packages/whook-example/src/handlers/getTime.ts
commandshttps://github.com/nfroidure/whook/blob/main/packages/whook-example/src/commands/printEnv.ts
https://github.com/juancampa
Juan Campa (juancampa)https://github.com/juancampa
on Dec 26, 2024https://github.com/microsoft/TypeScript/issues/38511#issuecomment-2563072724
membrane.iohttps://www.membrane.io
Mohsen Azimi (@mohsen1)https://github.com/mohsen1
https://github.com/Brennername
NeXeN (Brennername)https://github.com/Brennername
on Mar 21, 2025https://github.com/microsoft/TypeScript/issues/38511#issuecomment-2742121325
@Rich-Harrishttps://github.com/Rich-Harris
https://github.com/bgub
Ben Gubler (bgub)https://github.com/bgub
on Jul 9, 2025https://github.com/microsoft/TypeScript/issues/38511#issuecomment-3054361238
Glen Maddern (@geelen)https://github.com/geelen
https://github.com/AgentEnder
Craigory Coppola (AgentEnder)https://github.com/AgentEnder
on Oct 17, 2025https://github.com/microsoft/TypeScript/issues/38511#issuecomment-3416710787
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/38511
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/38511
In DiscussionNot yet reached consensushttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22In%20Discussion%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%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.