René's URL Explorer Experiment


Title: Declaration emit should not inline type definitions · Issue #37151 · microsoft/TypeScript · GitHub

Open Graph Title: Declaration emit should not inline type definitions · Issue #37151 · microsoft/TypeScript

X Title: Declaration emit should not inline type definitions · Issue #37151 · microsoft/TypeScript

Description: TypeScript Version: 3.8.3, 3.8.1, probably others Search Terms: declaration inlining, dts inlining, declaration inline, inline literal, declaration literal Code // parent.ts import { num, obj } from "./child" export const reExportNum = n...

Open Graph Description: TypeScript Version: 3.8.3, 3.8.1, probably others Search Terms: declaration inlining, dts inlining, declaration inline, inline literal, declaration literal Code // parent.ts import { num, obj } fro...

X Description: TypeScript Version: 3.8.3, 3.8.1, probably others Search Terms: declaration inlining, dts inlining, declaration inline, inline literal, declaration literal Code // parent.ts import { num, obj } fro...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Declaration emit should not inline type definitions","articleBody":"**TypeScript Version:**  3.8.3, 3.8.1, probably others\r\n\r\n**Search Terms:**\r\n\r\ndeclaration inlining, dts inlining, declaration inline, inline literal, declaration literal\r\n\r\n**Code**\r\n\r\n```ts\r\n// parent.ts\r\nimport { num, obj } from \"./child\"\r\nexport const reExportNum = num;\r\nexport const reExportObj = obj;\r\n```\r\n\r\n```ts\r\n// child.d.ts\r\nexport declare const num: number;\r\nexport declare const obj: { a: 1 };\r\n```\r\n\r\n`tsc index.ts --declaration`\r\n\r\n**Expected behavior:**\r\n\r\nDeclaration emit for `parent.ts` should not inline types.\r\n\r\n```ts\r\n// parent.d.ts\r\nimport { num, obj } from \"./child\"\r\nexport declare const reExportNum: typeof num;\r\nexport declare const reExportObj: typeof obj;\r\n```\r\n\r\n**Actual behavior:**\r\n\r\nToday, declaration emit for `parent.ts` inlines the types **and** eliminates the import of the `child.d.ts` type definition.\r\n\r\n```ts\r\n// parent.d.ts\r\nexport declare const reExportNum: number;\r\nexport declare const reExportObj: {\r\n    a: 1;\r\n};\r\n```\r\n\r\nThis is a correctness issue, because consumers of `parent.d.ts` will not get the correct types if the types in `child.d.ts` change.\r\n\r\nIn practice, this is most likely to happen when `parent` and `child` are in separate packages, because they are published independently, i.e. an application uses `parent-package` which uses types from `child-package`.  This is exacerbated by the current practice on npm of `parent-package` depending on an unpinned version, using `package.json` dependency syntax `\"child-package\": \"*\"`.\r\n\r\n\r\n> This issue was co-authored with @robpalme","author":{"url":"https://github.com/mheiber","@type":"Person","name":"mheiber"},"datePublished":"2020-03-02T12:45:47Z","url":"https://github.com/microsoft/TypeScript/issues/37151"}

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:3015d04a-d275-f613-f1fc-4d7ef5d680e1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8FBC:1087D4:27D8E44:35460BB:6B01B771
html-safe-noncecbdb92ab151ba0c6b586f11b004883146f93a438cb3c8c79c1b323ee50c4e45f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkJDOjEwODdENDoyN0Q4RTQ0OjM1NDYwQkI6NkIwMUI3NzEiLCJ2aXNpdG9yX2lkIjoiNTAxNTgwOTkyMTI4Mzg5NzIwMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacdf924f5736d7eccc177f781a7480e1ff0bdedb5f3d589db26e2eea17488cae61
hovercard-subject-tagissue:573950364
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/37151/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ed33574bd6d8146e1b28d8536e45df47d590f5bf8e204cdd1a9044787d795345/microsoft/TypeScript/issues/37151
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ed33574bd6d8146e1b28d8536e45df47d590f5bf8e204cdd1a9044787d795345/microsoft/TypeScript/issues/37151
og:image:altTypeScript Version: 3.8.3, 3.8.1, probably others Search Terms: declaration inlining, dts inlining, declaration inline, inline literal, declaration literal Code // parent.ts import { num, obj } fro...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemheiber
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/37151#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F37151
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%2F37151
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/37151
Reloadhttps://github.com/microsoft/TypeScript/issues/37151
Reloadhttps://github.com/microsoft/TypeScript/issues/37151
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/37151
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/37151
Declaration emit should not inline type definitionshttps://github.com/microsoft/TypeScript/issues/37151#top
https://github.com/weswigham
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
https://github.com/mheiber
Max Heiber (mheiber)https://github.com/mheiber
on Mar 2, 2020https://github.com/microsoft/TypeScript/issues/37151#issue-573950364
Rob Palmer (@robpalme)https://github.com/robpalme
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Mar 3, 2020https://github.com/microsoft/TypeScript/issues/37151#issuecomment-594162422
https://github.com/mheiber
Max Heiber (mheiber)https://github.com/mheiber
on Mar 4, 2020https://github.com/microsoft/TypeScript/issues/37151#issuecomment-594459823
Daniel Rosenwasser (@DanielRosenwasser)https://github.com/DanielRosenwasser
exampleshttps://github.com/microsoft/TypeScript/issues/37151#issuecomment-594162422
#29043https://github.com/microsoft/TypeScript/issues/29043
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
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 Mar 4, 2020https://github.com/microsoft/TypeScript/issues/37151#event-3098699083
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Wesley Wigham (weswigham)https://github.com/weswigham
on Mar 4, 2020https://github.com/microsoft/TypeScript/issues/37151#event-3098699307
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Mar 4, 2020https://github.com/microsoft/TypeScript/issues/37151#issuecomment-594876905
https://github.com/mheiber
Max Heiber (mheiber)https://github.com/mheiber
on Mar 5, 2020https://github.com/microsoft/TypeScript/issues/37151#issuecomment-595237446
#37151 (comment)https://github.com/microsoft/TypeScript/issues/37151#issuecomment-594876905
Ryan Cavanaugh (@RyanCavanaugh)https://github.com/RyanCavanaugh
https://github.com/mheiber
Max Heiber (mheiber)https://github.com/mheiber
on Mar 16, 2020https://github.com/microsoft/TypeScript/issues/37151#issuecomment-599531899
Ryan Cavanaugh (@RyanCavanaugh)https://github.com/RyanCavanaugh
the point of a declaration filehttps://github.com/microsoft/TypeScript/issues/37151#issuecomment-594876905
https://github.com/mheiber
Max Heiber (mheiber)https://github.com/mheiber
on Mar 31, 2020https://github.com/microsoft/TypeScript/issues/37151#issuecomment-606613389
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Mar 31, 2020https://github.com/microsoft/TypeScript/issues/37151#issuecomment-606732100
Max Heiber (@mheiber)https://github.com/mheiber
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
on Mar 31, 2020https://github.com/microsoft/TypeScript/issues/37151#issuecomment-606759533
#37444https://github.com/microsoft/TypeScript/pull/37444
https://github.com/mheiber
Max Heiber (mheiber)https://github.com/mheiber
on Mar 31, 2020https://github.com/microsoft/TypeScript/issues/37151#issuecomment-606804656
https://github.com/mheiber
Max Heiber (mheiber)https://github.com/mheiber
on Mar 31, 2020https://github.com/microsoft/TypeScript/issues/37151#issuecomment-606877864
#37444https://github.com/microsoft/TypeScript/pull/37444
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
on Mar 31, 2020https://github.com/microsoft/TypeScript/issues/37151#issuecomment-606883900
https://github.com/mheiber
Max Heiber (mheiber)https://github.com/mheiber
on Apr 1, 2020https://github.com/microsoft/TypeScript/issues/37151#issuecomment-607195208
Wesley Wigham (@weswigham)https://github.com/weswigham
#37151 (comment)https://github.com/microsoft/TypeScript/issues/37151#issuecomment-595237446
https://github.com/mheiber
Max Heiber (mheiber)https://github.com/mheiber
on Jun 24, 2020https://github.com/microsoft/TypeScript/issues/37151#issuecomment-648792115
Daniel Rosenwasser (@DanielRosenwasser)https://github.com/DanielRosenwasser
Separate type application from function application #29043https://github.com/microsoft/TypeScript/issues/29043
Make the type-level typeof aware of generic arguments #28931https://github.com/microsoft/TypeScript/issues/28931
https://stackoverflow.com/questions/60524543/how-can-i-get-the-type-of-a-function-application-in-typescripthttps://stackoverflow.com/questions/60524543/how-can-i-get-the-type-of-a-function-application-in-typescript
Titian Cernicova-Dragomir (@dragomirtitian)https://github.com/dragomirtitian
experimented with implementing this beforehttps://twitter.com/TitianCernicova/status/1235943836662329344?s=20
https://github.com/cyberixae
Toni Ruottu (cyberixae)https://github.com/cyberixae
on Aug 27, 2020https://github.com/microsoft/TypeScript/issues/37151#issuecomment-681920067
https://github.com/robpalme
Rob Palmer (robpalme)https://github.com/robpalme
on Aug 27, 2020https://github.com/microsoft/TypeScript/issues/37151#issuecomment-681927567
Toni Ruottu (@cyberixae)https://github.com/cyberixae
https://github.com/aleksey-ilin
IlinAlekseyS (aleksey-ilin)https://github.com/aleksey-ilin
on Dec 19, 2020https://github.com/microsoft/TypeScript/issues/37151#issuecomment-748484030
Max Heiber (@mheiber)https://github.com/mheiber
https://github.com/mheiber
Max Heiber (mheiber)https://github.com/mheiber
on Dec 19, 2020https://github.com/microsoft/TypeScript/issues/37151#issuecomment-748490938
IlinAlekseyS (@aleksey-ilin)https://github.com/aleksey-ilin
Rob Palmer (@robpalme)https://github.com/robpalme
not picking a consistent modelhttps://github.com/microsoft/TypeScript/issues/37151#issuecomment-595237446
https://github.com/robpalme
Rob Palmer (robpalme)https://github.com/robpalme
on Jan 7, 2021https://github.com/microsoft/TypeScript/issues/37151#issuecomment-756232934
IlinAlekseyS (@aleksey-ilin)https://github.com/aleksey-ilin
#42149https://github.com/microsoft/TypeScript/pull/42149
https://github.com/electrovir
electrovir (electrovir)https://github.com/electrovir
on Sep 15, 2024https://github.com/microsoft/TypeScript/issues/37151#issuecomment-2351651313
examplehttps://unpkg.com/browse/@augment-vir/assert@30.0.4/dist/augments/guards/check.d.ts
examplehttps://unpkg.com/browse/date-vir@5.3.2/dist/esm/full-date/full-date-shape.d.ts
examplehttps://unpkg.com/browse/localforage-esm@1.10.0/dist/index.d.ts
herehttps://unpkg.com/browse/localforage-esm@1.10.2/src/index.d.ts
https://github.com/robpalme
Rob Palmer (robpalme)https://github.com/robpalme
on Sep 16, 2024https://github.com/microsoft/TypeScript/issues/37151#issuecomment-2351925372
more workhttps://github.com/microsoft/TypeScript/pull/59282
https://github.com/samchungy
Sam Chung (samchungy)https://github.com/samchungy
on Nov 6, 2024https://github.com/microsoft/TypeScript/issues/37151#issuecomment-2458694963
Sebastian "Sebbie" Silbermann (eps1lon)https://github.com/eps1lon
on May 12, 2025https://github.com/microsoft/TypeScript/issues/37151#event-17616458999
[link] Avoid inlining of `LinkProps` in emitted declarations (#78773)https://github.com/vercel/next.js/commit/556e0c6a3d198f83cbaaf9229bab5eb9d72ccebd
#78773https://github.com/vercel/next.js/pull/78773
556e0c6https://github.com/vercel/next.js/commit/556e0c6a3d198f83cbaaf9229bab5eb9d72ccebd
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/37151
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/37151
Wesley Wigham (weswigham)https://github.com/weswigham
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
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.