Title: Erroneous specifiers in declaration files. · Issue #26295 · microsoft/TypeScript · GitHub
Open Graph Title: Erroneous specifiers in declaration files. · Issue #26295 · microsoft/TypeScript
X Title: Erroneous specifiers in declaration files. · Issue #26295 · microsoft/TypeScript
Description: TypeScript Version: 3.0.1 Search Terms: import, eac Code // A *self-contained* demonstration of the problem follows... // Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc. ...
Open Graph Description: TypeScript Version: 3.0.1 Search Terms: import, eac Code // A *self-contained* demonstration of the problem follows... // Test this by running `tsc` on the command-line, rather than through another...
X Description: TypeScript Version: 3.0.1 Search Terms: import, eac Code // A *self-contained* demonstration of the problem follows... // Test this by running `tsc` on the command-line, rather than through another...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/26295
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Erroneous specifiers in declaration files.","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\r\n\u003c!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:** 3.0.1\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:** import, eac\r\n\r\n**Code**\r\n\r\n```ts\r\n// A *self-contained* demonstration of the problem follows...\r\n// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.\r\nimport styled from \"react-emotion\"\r\n\r\nconst Form = styled('div')({ color: \"red\" })\r\n\r\nexport default Form\r\n```\r\n\r\n**Expected behavior:**\r\nWhen run with `--declaration`, the output I expected was:\r\n\r\n```js\r\nimport * as React from \"react\";\r\nexport declare const Form: import(\"create-emotion-styled/types/react\").StyledOtherComponent\u003c{}, React.DetailedHTMLProps\u003cReact.HTMLAttributes\u003cHTMLDivElement>, HTMLDivElement>, any>;\r\nexport default Form;\r\n```\r\n\r\n**Actual behavior:**\r\nWhen run with `--declaration`, the generated `.d.ts` file contains:\r\n\r\n```ts\r\n/// \u003creference path=\"../../node_modules/create-emotion/types/index.d.ts\" />\r\n/// \u003creference types=\"react\" />\r\nexport declare const Form: import(\"create-emotion-styled/types/react\").StyledOtherComponent\u003c{}, import(\"eac\").DetailedHTMLProps\u003cimport(\"eac\").HTMLAttributes\u003cHTMLDivElement>, HTMLDivElement>, any>;\r\nexport default Form;\r\n```\r\n\r\nWhat's really strange is `import(\"eac\")`. Where in the world is this coming from? 🤔 \r\n\r\n**Playground Link:** \u003c!-- A link to a TypeScript Playground \"Share\" link which demonstrates this behavior -->\r\nI can't add a playground link because it depends on import.\r\n\r\n**Related Issues:** https://github.com/emotion-js/emotion/issues/788\r\n","author":{"url":"https://github.com/TejasQ","@type":"Person","name":"TejasQ"},"datePublished":"2018-08-08T08:47:56Z","url":"https://github.com/microsoft/TypeScript/issues/26295"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0808abcc-355c-a994-40a5-f65481237f2e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B2C0:2BE220:2672304:33528F1:6B01AB1A |
| html-safe-nonce | eeaf128dccf3b80a3913f4af704f43b52d67f2c169225a14aead78eace5990aa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMkMwOjJCRTIyMDoyNjcyMzA0OjMzNTI4RjE6NkIwMUFCMUEiLCJ2aXNpdG9yX2lkIjoiMzI5ODMyNDMzMjk0MTUxOTY0MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8fd663634379ca37eda5345d95b8190a84a82e73fe9ed224829a6a0d879b08cb |
| hovercard-subject-tag | issue:348631786 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/26295/issue_layout |
| twitter:image | https://opengraph.githubassets.com/44fec30f81fafe1077bcc15954a88e4889a46038a2c4c3fd264ab39ddb2f9ced/microsoft/TypeScript/issues/26295 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/44fec30f81fafe1077bcc15954a88e4889a46038a2c4c3fd264ab39ddb2f9ced/microsoft/TypeScript/issues/26295 |
| og:image:alt | TypeScript Version: 3.0.1 Search Terms: import, eac Code // A *self-contained* demonstration of the problem follows... // Test this by running `tsc` on the command-line, rather than through another... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | TejasQ |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width