Title: unique symbol type imported in declaration files used as computed property key can not be named · Issue #38516 · microsoft/TypeScript · GitHub
Open Graph Title: unique symbol type imported in declaration files used as computed property key can not be named · Issue #38516 · microsoft/TypeScript
X Title: unique symbol type imported in declaration files used as computed property key can not be named · Issue #38516 · microsoft/TypeScript
Description: TypeScript Version: 3.8 and 3.9.2 This is a regression from 3.7. Search Terms: unique symbol, index signature Code This is a distilled code from a bigger codebase. The Op is imported from Sequelize import Op from './op'; export default f...
Open Graph Description: TypeScript Version: 3.8 and 3.9.2 This is a regression from 3.7. Search Terms: unique symbol, index signature Code This is a distilled code from a bigger codebase. The Op is imported from Sequelize...
X Description: TypeScript Version: 3.8 and 3.9.2 This is a regression from 3.7. Search Terms: unique symbol, index signature Code This is a distilled code from a bigger codebase. The Op is imported from Sequelize...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/38516
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"unique symbol type imported in declaration files used as computed property key can not be named","articleBody":"\r\n**TypeScript Version:** 3.8 and 3.9.2\r\n\r\n**This is a regression from 3.7.**\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:**\r\nunique symbol, index signature \r\n\r\n\r\n**Code**\r\nThis is a distilled code from a bigger codebase. [The `Op` is imported from Sequelize ](https://github.com/sequelize/sequelize/blob/784712e868a7f77fb23d87361b2238922ceec0f5/types/lib/operators.d.ts#L4)\r\n\r\n\r\n\r\n```ts\r\nimport Op from './op';\r\n\r\nexport default function foo() {\r\n return {\r\n [Op.or]: [],\r\n };\r\n}\r\n```\r\n\r\n```ts\r\n// op.ts\r\ndeclare const Op: {\r\n readonly or: unique symbol;\r\n};\r\n\r\nexport default Op;\r\n```\r\n\r\n**`tsconfig.json`**\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"outDir\": \"dist\",\r\n \"target\": \"es5\",\r\n \"module\": \"commonjs\",\r\n \"declaration\": true,\r\n \"strict\": true,\r\n \"esModuleInterop\": true\r\n }\r\n}\r\n```\r\n\r\n**Expected behavior:**\r\nNo Error\r\n**Actual behavior:**\r\n```\r\nindex.ts:3:25 - error TS4058: Return type of exported function has or is using name 'or' from external module \"/Users/mohsen_azimi/Desktop/3.9-regression/op\" but cannot be named.\r\n\r\n3 export default function foo() {\r\n ~~~\r\n```\r\n\r\n\r\n**Related Issues:** \u003c!-- Did you find other bugs that looked similar? -->\r\nhttps://github.com/microsoft/TypeScript/issues/9944","author":{"url":"https://github.com/mohsen1","@type":"Person","name":"mohsen1"},"datePublished":"2020-05-13T00:46:18Z","url":"https://github.com/microsoft/TypeScript/issues/38516"}
| 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:d8facbf8-b9e3-28ce-68eb-7de926d5c124 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BE90:85940:1CDA2:25C04:6B017A4B |
| html-safe-nonce | b61cbfffa7d173e05b996c5888b593e19bd01e48e556db606b6c21ce1a9c7fdd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTkwOjg1OTQwOjFDREEyOjI1QzA0OjZCMDE3QTRCIiwidmlzaXRvcl9pZCI6IjU5MTU1NTA0MTgxMjA4MzM2MTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d95b2a401e10cbacce1cdd4014a6ff165da094b362a968681a4ea962bae78f6a |
| hovercard-subject-tag | issue:617056825 |
| 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/38516/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fc3b03754338271b78bc3af2bf9f8157c5cea88bec1d893c355f3049b2e33af2/microsoft/TypeScript/issues/38516 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fc3b03754338271b78bc3af2bf9f8157c5cea88bec1d893c355f3049b2e33af2/microsoft/TypeScript/issues/38516 |
| og:image:alt | TypeScript Version: 3.8 and 3.9.2 This is a regression from 3.7. Search Terms: unique symbol, index signature Code This is a distilled code from a bigger codebase. The Op is imported from Sequelize... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mohsen1 |
| 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