René's URL Explorer Experiment


Title: Declarations can't be emitted when types from inner modules are exported through separate export declarations · Issue #56856 · microsoft/TypeScript · GitHub

Open Graph Title: Declarations can't be emitted when types from inner modules are exported through separate export declarations · Issue #56856 · microsoft/TypeScript

X Title: Declarations can't be emitted when types from inner modules are exported through separate export declarations · Issue #56856 · microsoft/TypeScript

Description: 🔎 Search Terms declarations portable emit modules export declaration alias aliasing 🕗 Version & Regression Information This is the behavior in every version I tried ⏯ Playground Link N/A 💻 Code // @strict: true // @declaration: true // @...

Open Graph Description: 🔎 Search Terms declarations portable emit modules export declaration alias aliasing 🕗 Version & Regression Information This is the behavior in every version I tried ⏯ Playground Link N/A 💻 Code // ...

X Description: 🔎 Search Terms declarations portable emit modules export declaration alias aliasing 🕗 Version & Regression Information This is the behavior in every version I tried ⏯ Playground Link N/A 💻 Code...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Declarations can't be emitted when types from inner modules are exported through separate export declarations","articleBody":"### 🔎 Search Terms\n\ndeclarations portable emit modules export declaration alias aliasing\n\n### 🕗 Version & Regression Information\n\n- This is the behavior in every version I tried\n\n### ⏯ Playground Link\n\nN/A\n\n### 💻 Code\n\n```ts\r\n// @strict: true\r\n// @declaration: true\r\n// @module: nodenext\r\n// @moduleResolution: nodenext\r\n// @target: esnext\r\n\r\n// @filename: node_modules/@tanstack/vue-query/build/modern/useQuery-CPqkvEsh.d.ts\r\ntype QueryKey = ReadonlyArray\u003cunknown>;\r\n\r\ninterface Register {}\r\n\r\ntype DefaultError = Register extends {\r\n  defaultError: infer TError;\r\n}\r\n  ? TError\r\n  : Error;\r\n\r\ntype ShouldRetryFunction\u003cTError = DefaultError> = (\r\n  failureCount: number,\r\n  error: TError,\r\n) => boolean;\r\ntype RetryValue\u003cTError> = boolean | number | ShouldRetryFunction\u003cTError>;\r\n\r\ntype QueryFunctionContext\u003c\r\n  TQueryKey extends QueryKey = QueryKey,\r\n  TPageParam = never,\r\n> = [TPageParam] extends [never]\r\n  ? {\r\n      queryKey: TQueryKey;\r\n    }\r\n  : {\r\n      queryKey: TQueryKey;\r\n      pageParam: TPageParam;\r\n    };\r\n\r\ntype QueryFunction\u003c\r\n  T = unknown,\r\n  TQueryKey extends QueryKey = QueryKey,\r\n  TPageParam = never,\r\n> = (context: QueryFunctionContext\u003cTQueryKey, TPageParam>) => T | Promise\u003cT>;\r\n\r\ninterface QueryOptions\u003c\r\n  TQueryFnData = unknown,\r\n  TError = DefaultError,\r\n  TData = TQueryFnData,\r\n  TQueryKey extends QueryKey = QueryKey,\r\n  TPageParam = never,\r\n> {\r\n  retry?: RetryValue\u003cTError>;\r\n  queryFn?: QueryFunction\u003cTQueryFnData, TQueryKey, TPageParam>;\r\n  queryKey?: TQueryKey;\r\n  initialData?: TData;\r\n  initialDataUpdatedAt?: number | (() => number | undefined);\r\n}\r\n\r\ninterface QueryObserverOptions\u003c\r\n  TQueryFnData = unknown,\r\n  TError = DefaultError,\r\n  TData = TQueryFnData,\r\n  TQueryData = TQueryFnData,\r\n  TQueryKey extends QueryKey = QueryKey,\r\n  TPageParam = never,\r\n> extends QueryOptions\u003c\r\n    TQueryFnData,\r\n    TError,\r\n    TQueryData,\r\n    TQueryKey,\r\n    TPageParam\r\n  > {\r\n  enabled?: boolean;\r\n  refetchInterval?: number;\r\n  select?: (data: TQueryData) => TData;\r\n}\r\n\r\ntype UseQueryOptions\u003c\r\n  TQueryFnData = unknown,\r\n  TError = DefaultError,\r\n  TData = TQueryFnData,\r\n  TQueryData = TQueryFnData,\r\n  TQueryKey extends QueryKey = QueryKey,\r\n> = {\r\n  [Property in keyof QueryObserverOptions\u003c\r\n    TQueryFnData,\r\n    TError,\r\n    TData,\r\n    TQueryData,\r\n    TQueryKey\r\n  >]: QueryObserverOptions\u003c\r\n    TQueryFnData,\r\n    TError,\r\n    TData,\r\n    TQueryData,\r\n    TQueryKey\r\n  >[Property];\r\n};\r\n\r\ntype UndefinedInitialQueryOptions\u003c\r\n  TQueryFnData = unknown,\r\n  TError = DefaultError,\r\n  TData = TQueryFnData,\r\n  TQueryKey extends QueryKey = QueryKey,\r\n> = UseQueryOptions\u003cTQueryFnData, TError, TData, TQueryFnData, TQueryKey> & {\r\n  initialData?: undefined;\r\n};\r\n\r\ninterface QueryObserverBaseResult\u003cTData = unknown, TError = DefaultError> {\r\n  data: TData | undefined;\r\n  dataUpdatedAt: number;\r\n  error: TError | null;\r\n  errorUpdatedAt: number;\r\n  failureCount: number;\r\n  failureReason: TError | null;\r\n  errorUpdateCount: number;\r\n  isError: boolean;\r\n  isFetched: boolean;\r\n  isFetchedAfterMount: boolean;\r\n  isFetching: boolean;\r\n  isLoading: boolean;\r\n  isPending: boolean;\r\n  isLoadingError: boolean;\r\n  isInitialLoading: boolean;\r\n  isPaused: boolean;\r\n  isPlaceholderData: boolean;\r\n  isRefetchError: boolean;\r\n  isRefetching: boolean;\r\n  isStale: boolean;\r\n  isSuccess: boolean;\r\n}\r\n\r\ninterface QueryObserverSuccessResult\u003cTData = unknown, TError = DefaultError>\r\n  extends QueryObserverBaseResult\u003cTData, TError> {\r\n  data: TData;\r\n  error: null;\r\n  isError: false;\r\n  isPending: false;\r\n  isLoadingError: false;\r\n  isRefetchError: false;\r\n  isSuccess: true;\r\n  status: \"success\";\r\n}\r\n\r\ntype DefinedQueryObserverResult\u003c\r\n  TData = unknown,\r\n  TError = DefaultError,\r\n> = QueryObserverSuccessResult\u003cTData, TError>;\r\ntype QueryObserverResult\u003c\r\n  TData = unknown,\r\n  TError = DefaultError,\r\n> = DefinedQueryObserverResult\u003cTData, TError>;\r\n\r\ntype ToRef\u003cT> = {\r\n  value: T;\r\n};\r\n\r\ntype UseBaseQueryReturnType\u003c\r\n  TData,\r\n  TError,\r\n  Result = QueryObserverResult\u003cTData, TError>,\r\n> = {\r\n  [K in keyof Result]: K extends\r\n    | \"fetchNextPage\"\r\n    | \"fetchPreviousPage\"\r\n    | \"refetch\"\r\n    ? Result[K]\r\n    : ToRef\u003cReadonly\u003cResult>[K]>;\r\n} & {\r\n  suspense: () => Promise\u003cResult>;\r\n};\r\n\r\ntype UseQueryReturnType\u003cTData, TError> = UseBaseQueryReturnType\u003cTData, TError>;\r\n\r\ndeclare function useQuery\u003c\r\n  TQueryFnData = unknown,\r\n  TError = DefaultError,\r\n  TData = TQueryFnData,\r\n  TQueryKey extends QueryKey = QueryKey,\r\n>(\r\n  options: UndefinedInitialQueryOptions\u003cTQueryFnData, TError, TData, TQueryKey>,\r\n): UseQueryReturnType\u003cTData, TError>;\r\n\r\nexport { type UseQueryReturnType as b, useQuery as u };\r\n\r\n// @filename: node_modules/@tanstack/vue-query/build/modern/index.d.ts\r\nexport { b as UseQueryReturnType, u as useQuery } from './useQuery-CPqkvEsh.js';\r\n\r\n// @filename: node_modules/@tanstack/vue-query/package.json\r\n{\r\n  \"name\": \"@tanstack/vue-query\",\r\n  \"type\": \"module\",\r\n  \"exports\": {\r\n    \".\": {\r\n      \"import\": {\r\n        \"types\": \"./build/modern/index.d.ts\",\r\n        \"default\": \"./build/modern/index.js\"\r\n      },\r\n      \"require\": {\r\n        \"types\": \"./build/modern/index.d.cts\",\r\n        \"default\": \"./build/modern/index.cjs\"\r\n      }\r\n    }\r\n  }\r\n}\r\n\r\n// @filename: src/index.mts\r\nimport { useQuery } from '@tanstack/vue-query'\r\n\r\nconst baseUrl = 'https://api.publicapis.org/'\r\n\r\ninterface IEntry {\r\n  API: string\r\n  Description: string\r\n  Auth: string\r\n  HTTPS: boolean\r\n  Cors: string\r\n  Link: string\r\n  Category: string\r\n}\r\n\r\nconst testApi = {\r\n  getEntries: (): Promise\u003cIEntry[]> => {\r\n    return fetch(baseUrl + 'entries')\r\n      .then((res) => res.json())\r\n      .then((data) => data.entries)\r\n      .catch((err) => console.log(err))\r\n  }\r\n}\r\n\r\nconst entryKeys = {\r\n  all: ['entries'] as const,\r\n  list: () => [...entryKeys.all, 'list'] as const\r\n}\r\n\r\nexport const useEntries = () => {\r\n  return useQuery({\r\n    queryKey: entryKeys.list(),\r\n    queryFn: testApi.getEntries,\r\n    select: (data) => data.slice(0, 10)\r\n  })\r\n}\r\n```\r\n\n\n### 🙁 Actual behavior\n\n```\r\nThe inferred type of 'useEntries' cannot be named without a reference to '../../node_modules/@tanstack/vue-query/build/modern/useQuery-d58edace'. This is likely not portable. A type annotation is necessary.ts(2742)\r\n```\n\n### 🙂 Expected behavior\n\nA declaration like this should be emitted successfully:\r\n```ts\r\ninterface IEntry {\r\n    API: string;\r\n    Description: string;\r\n    Auth: string;\r\n    HTTPS: boolean;\r\n    Cors: string;\r\n    Link: string;\r\n    Category: string;\r\n}\r\nexport declare const useEntries: () => import(\"@tanstack/vue-query\").UseQueryReturnType\u003cIEntry[], Error>;\r\nexport {};\r\n```\n\n### Additional information about the issue\n\nIt originally has been reported here: https://github.com/TanStack/query/issues/6318","author":{"url":"https://github.com/Andarist","@type":"Person","name":"Andarist"},"datePublished":"2023-12-23T11:47:53Z","url":"https://github.com/microsoft/TypeScript/issues/56856"}

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:0c0222ca-f8b8-f28f-8343-15ad4c3177f7
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAA54:292BF3:E8F6B5:12F08B2:6B04E888
html-safe-nonce4f298cb0b8e3eecbe5d91180a56c137ff0ec0b3c8153d092f209c203287e550b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQTU0OjI5MkJGMzpFOEY2QjU6MTJGMDhCMjo2QjA0RTg4OCIsInZpc2l0b3JfaWQiOiIyMzY2NTAyMjY0MzU0Njk1MzA0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac8520a8cac33012bdc454bd3b88925ef7280d4181240e03097207e060f82d0cd7
hovercard-subject-tagissue:2054763867
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/56856/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f964cf0536378048c616dcc5b556c4446bac8821fda4c8e590957cc0d7489ae3/microsoft/TypeScript/issues/56856
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f964cf0536378048c616dcc5b556c4446bac8821fda4c8e590957cc0d7489ae3/microsoft/TypeScript/issues/56856
og:image:alt🔎 Search Terms declarations portable emit modules export declaration alias aliasing 🕗 Version & Regression Information This is the behavior in every version I tried ⏯ Playground Link N/A 💻 Code // ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameAndarist
hostnamegithub.com
expected-hostnamegithub.com
Nonef3851aad500d8e8dce736722ddc6fa9596e17d9fce3c53581eba968664c0bc32
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
releasee29c922455fd8137f27e1cfcdf6a1e8b920b1926
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/56856#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F56856
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%2F56856
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/56856
Reloadhttps://github.com/microsoft/TypeScript/issues/56856
Reloadhttps://github.com/microsoft/TypeScript/issues/56856
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests319 (319)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/56856
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/56856
#56857https://github.com/microsoft/TypeScript/pull/56857
Declarations can't be emitted when types from inner modules are exported through separate export declarationshttps://github.com/microsoft/TypeScript/issues/56856#top
#56857https://github.com/microsoft/TypeScript/pull/56857
https://github.com/weswigham
Fix Availablehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fix%20Available%22
Possible Improvementhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Possible%20Improvement%22
Backloghttps://github.com/microsoft/TypeScript/milestone/29
https://github.com/Andarist
Mateusz Burzyński (Andarist)https://github.com/Andarist
on Dec 23, 2023https://github.com/microsoft/TypeScript/issues/56856#issue-2054763867
TanStack/query#6318https://github.com/TanStack/query/issues/6318
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Possible Improvementhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Possible%20Improvement%22
on Jan 2, 2024https://github.com/microsoft/TypeScript/issues/56856#event-11372751769
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Wesley Wigham (weswigham)https://github.com/weswigham
on Jan 2, 2024https://github.com/microsoft/TypeScript/issues/56856#event-11372752448
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Backloghttps://github.com/microsoft/TypeScript/milestone/29
on Jan 2, 2024https://github.com/microsoft/TypeScript/issues/56856#event-11372752595
TypeScript Bot (typescript-bot)https://github.com/typescript-bot
Fix Availablehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fix%20Available%22
on Jan 4, 2024https://github.com/microsoft/TypeScript/issues/56856#event-11395448290
Wesley Wigham (weswigham)https://github.com/weswigham
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#56857https://github.com/microsoft/TypeScript/pull/56857
on Jan 9, 2024https://github.com/microsoft/TypeScript/issues/56856#event-11434670572
microsofthttps://github.com/microsoft
on Oct 22, 2025https://github.com/microsoft/TypeScript/issues/56856#event-20419626602
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/56856
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/56856
Wesley Wigham (weswigham)https://github.com/weswigham
Fix Availablehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fix%20Available%22
Possible Improvementhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Possible%20Improvement%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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.