René's URL Explorer Experiment


Title: Declaration files error for function return types · Issue #25685 · microsoft/TypeScript · GitHub

Open Graph Title: Declaration files error for function return types · Issue #25685 · microsoft/TypeScript

X Title: Declaration files error for function return types · Issue #25685 · microsoft/TypeScript

Description: TypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Declaration files error for function return types · Issue #25685 · microsoft/TypeScript

Open Graph Description: TypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Declaration files error for function return types · Issue #25685 · microsoft/TypeScript

X Description: TypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Declaration files error for function return types · Issue #25685 · microsoft/TypeScript

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Declaration files error for function return types","articleBody":"\u003c!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨\r\n\r\nHalf of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common \"Bugs\" That Aren't Bugs section!\r\n\r\nPlease help us by doing the following steps before logging an issue:\r\n  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues\r\n  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ\r\n\r\nPlease fill in the *entire* template below.\r\n-->\r\n\r\n\u003c!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:**  2.9.2\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:** declaration file inline import, declaration files import path error\r\n\r\n**Code**\r\n\r\nIn *src/lib/operators/scalar.ts*\r\n```ts\r\nexport interface Scalar {\r\n\t(): string\r\n\r\n\tvalue: number\r\n\tunit: Unit\r\n\r\n\tadd(value: Scalable): this\r\n\tsubtract(value: Scalable): this\r\n\tmultiply(value: Scalable): this\r\n\tdivide(value: Scalable): this\r\n\tget(): string\r\n\ttoString(): string\r\n}\r\n\r\nexport function scalar(value: string): Scalar {\r\n\treturn parseScalar(value)  // returns an object of type scalar\r\n}\r\n```\r\n\r\nIn *src/settings/spacing.ts*\r\n```ts\r\nimport { scalar } from '../lib/operators/scalar'\r\nconst baseSpacing = \"14px\"\r\n\r\nexport default {\r\n\tget xs() {\r\n\t\treturn scalar(baseSpacing).divide(4) // returns an object of type Scalar\r\n\t}\r\n})\r\n```\r\n\r\n**Expected behavior:**\r\nIn *dist/settings/spacing.d.ts*\r\n```ts\r\nimport {Scalar} from \"../lib/operators/scalar\"\r\nexport default {\r\n\treadonly xs: Scalar\r\n}\r\n```\r\n\r\n**Actual behavior:**\r\nIn *dist/settings/spacing.d.ts*\r\n```ts\r\nexport default {\r\n\treadonly xs: import(\"src/lib/operators/scalar\").Scalar\r\n}\r\n```\r\n\r\n**NOTES**:\r\n- Should it import inline? (tslint complains that it shouldn't)\r\n- The path should be \"../lib/operators/scalar\"\r\n\r\n**Local tsconfig.json**\r\n```json\r\n{\r\n\t\"extends\": \"./../../tsconfig.json\",\r\n\t\"compilerOptions\": {\r\n\t\t\"baseUrl\": \"./\",\r\n\t\t\"paths\": {\r\n\t\t\t\"*\": [\"node_modules/@types/*\", \"*\"]\r\n\t\t},\r\n\t\t\"outDir\": \"./dist\",\r\n\t\t\"rootDir\": \"./src\",\r\n\t\t\"target\": \"es5\",\r\n\t\t\"module\": \"commonjs\",\r\n\t\t\"moduleResolution\": \"node\",\r\n\t\t\"allowSyntheticDefaultImports\": true,\r\n\t\t\"allowJs\": false,\r\n\t\t\"declaration\": true,\r\n\t\t\"jsx\": \"react\",\r\n\t\t\"sourceMap\": true\r\n\t},\r\n\t\"include\": [\"./src/**/*\"],\r\n\t\"exclude\": [\r\n\t\t\"node_modules\",\r\n\t\t\"src/**/__tests__/\",\r\n\t\t\"build\",\r\n\t\t\"dist\",\r\n\t\t\"scripts\",\r\n\t\t\"acceptance-tests\",\r\n\t\t\"webpack\",\r\n\t\t\"jest\",\r\n\t\t\"src/setupTests.ts\",\r\n\t\t\"webpack.config.js\"\r\n\t]\r\n}\r\n```\r\n\r\n**Main tsconfig.json**\r\n```json\r\n{\r\n\t\"compilerOptions\": {\r\n\t\t\"baseUrl\": \"\",\r\n\t\t\"module\": \"esnext\",\r\n\t\t\"target\": \"es5\",\r\n\t\t\"lib\": [\"dom\", \"esnext\", \"es6\"],\r\n\t\t\"sourceMap\": true,\r\n\t\t\"allowJs\": true,\r\n\t\t\"jsx\": \"react\",\r\n\t\t\"moduleResolution\": \"node\",\r\n\t\t\"rootDir\": \"src\",\r\n\t\t\"forceConsistentCasingInFileNames\": true,\r\n\t\t\"noImplicitReturns\": true,\r\n\t\t\"noImplicitThis\": true,\r\n\t\t\"noImplicitAny\": false,\r\n\t\t\"strictNullChecks\": true,\r\n\t\t\"suppressImplicitAnyIndexErrors\": true,\r\n\t\t\"noUnusedLocals\": true,\r\n\t\t\"paths\": {\r\n\t\t\t\"@libs/components\": [\"Libs/Components/dist/index.js\"]\r\n\t\t}\r\n\t}\r\n}\r\n```\r\n","author":{"url":"https://github.com/robertontiu","@type":"Person","name":"robertontiu"},"datePublished":"2018-07-16T12:39:20Z","url":"https://github.com/microsoft/TypeScript/issues/25685"}

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/:user_id/:repository/issues/:id(.:format)
route-controllerissues
route-actionshow
fetch-noncev2:e5c6ee6c-9834-1432-c225-f55c1994e87c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA660:213839:2D75A54:3A1DA63:6B01AE4A
html-safe-noncefec0fa773cbe43215a31e73c3f00cc044d7090f03453508bb89f8c09ffd3a61e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjYwOjIxMzgzOToyRDc1QTU0OjNBMURBNjM6NkIwMUFFNEEiLCJ2aXNpdG9yX2lkIjoiMzQxOTY3Nzg0Njg4ODU2NjUxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacc195667cbadbda8df279c2bdc5b235df589c6d6f988e19a990b6b37e5d068cb4
hovercard-subject-tagrepository:20929025
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///issues/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/microsoft/TypeScript/issues/25685
twitter:imagehttps://opengraph.githubassets.com/47cde802d3847ff7ce61448bd4f8c3272d012c9a3f2b9085b71a67530bf7bbd6/microsoft/TypeScript
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/47cde802d3847ff7ce61448bd4f8c3272d012c9a3f2b9085b71a67530bf7bbd6/microsoft/TypeScript
og:image:altTypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Declaration files error for function return types · Issue #25685 · microsoft/TypeScript
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-cache
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/25685#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F25685
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%2F25685
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fissues%2Fshow&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/25685
Reloadhttps://github.com/microsoft/TypeScript/issues/25685
Reloadhttps://github.com/microsoft/TypeScript/issues/25685
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/25685
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/25685
Declaration files error for function return typeshttps://github.com/microsoft/TypeScript/issues/25685#top
https://github.com/weswigham
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Domain: Declaration EmitThe issue relates to the emission of d.ts fileshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20Declaration%20Emit%22
TypeScript 3.1https://github.com/microsoft/TypeScript/milestone/74
https://github.com/robertontiu
Robert Ontiu (robertontiu)https://github.com/robertontiu
on Jul 16, 2018https://github.com/microsoft/TypeScript/issues/25685#issue-341502001
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Jul 16, 2018https://github.com/microsoft/TypeScript/issues/25685#issuecomment-405306764
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
Wesley Wigham (weswigham)https://github.com/weswigham
on Jul 16, 2018https://github.com/microsoft/TypeScript/issues/25685#event-1736045999
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
TypeScript 3.0.1https://github.com/microsoft/TypeScript/milestone/75
on Jul 16, 2018https://github.com/microsoft/TypeScript/issues/25685#event-1736046095
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Domain: Declaration EmitThe issue relates to the emission of d.ts fileshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20Declaration%20Emit%22
on Jul 16, 2018https://github.com/microsoft/TypeScript/issues/25685#event-1736046170
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
on Jul 16, 2018https://github.com/microsoft/TypeScript/issues/25685#issuecomment-405403060
https://github.com/robertontiu
Robert Ontiu (robertontiu)https://github.com/robertontiu
on Jul 17, 2018https://github.com/microsoft/TypeScript/issues/25685#issuecomment-405492759
Wesley Wigham (@weswigham)https://github.com/weswigham
Daniel Rosenwasser (@DanielRosenwasser)https://github.com/DanielRosenwasser
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
on Jul 17, 2018https://github.com/microsoft/TypeScript/issues/25685#issuecomment-405626413
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
on Jul 17, 2018https://github.com/microsoft/TypeScript/issues/25685#issuecomment-405628919
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
TypeScript 3.0.1https://github.com/microsoft/TypeScript/milestone/75
TypeScript 3.1https://github.com/microsoft/TypeScript/milestone/74
on Jul 18, 2018https://github.com/microsoft/TypeScript/issues/25685#event-1741004394
https://github.com/robertontiu
Robert Ontiu (robertontiu)https://github.com/robertontiu
on Jul 19, 2018https://github.com/microsoft/TypeScript/issues/25685#issuecomment-406180256
Wesley Wigham (@weswigham)https://github.com/weswigham
https://github.com/ronp001
Ron Perry (ronp001)https://github.com/ronp001
on Aug 9, 2018https://github.com/microsoft/TypeScript/issues/25685#issuecomment-411914281
Wesley Wigham (@weswigham)https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#26341https://github.com/microsoft/TypeScript/pull/26341
on Aug 10, 2018https://github.com/microsoft/TypeScript/issues/25685#event-1783265306
microsofthttps://github.com/microsoft
on Oct 21, 2025https://github.com/microsoft/TypeScript/issues/25685#event-20415736745
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/25685
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/25685
Wesley Wigham (weswigham)https://github.com/weswigham
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Domain: Declaration EmitThe issue relates to the emission of d.ts fileshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20Declaration%20Emit%22
TypeScript 3.1https://github.com/microsoft/TypeScript/milestone/74
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.