Title: The export type of namespace presents the wrong typing alert · Issue #37408 · microsoft/TypeScript · GitHub
Open Graph Title: The export type of namespace presents the wrong typing alert · Issue #37408 · microsoft/TypeScript
X Title: The export type of namespace presents the wrong typing alert · Issue #37408 · microsoft/TypeScript
Description: TypeScript Version: 3.7.2 Search Terms: namespace, typing Code type Nullable
Open Graph Description: TypeScript Version: 3.7.2 Search Terms: namespace, typing Code type Nullable
X Description: TypeScript Version: 3.7.2 Search Terms: namespace, typing Code type Nullable<T> = T | null export namespace ProfileFields { type name = string; type WHYYY = string | null; type id = string | ...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/37408
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"The export type of namespace presents the wrong typing alert ","articleBody":"**TypeScript Version:** 3.7.2\r\n\r\n**Search Terms:**\r\nnamespace, typing\r\n\r\n**Code**\r\n```ts\r\ntype Nullable\u003cT> = T | null\r\n\r\nexport namespace ProfileFields {\r\n type name = string;\r\n type WHYYY = string | null;\r\n type id = string | null;\r\n // export type WHYYY = Nullable\u003cstring>;\r\n // export type id = Nullable\u003cstring>;\r\n}\r\n\r\nexport interface Profile {\r\n name: ProfileFields.name;\r\n WHYYY: ProfileFields.WHYYY;\r\n id: ProfileFields.id;\r\n}\r\n\r\nexport type General = Pick\u003cProfile, 'WHYYY' | 'name' | 'id'>\r\n```\r\n\r\n**Expected behavior:**\r\n```ts\r\ntype General = {\r\nWHYYY: ProfileFields.WHHYY\r\nname: ProfileFields.name\r\nid: ProfileFields.id\r\n}\r\n```\r\n\r\n**Actual behavior:**\r\n```ts\r\ntype General = {\r\nWHYYY: ProfileFields.WHHYY\r\nname: ProfileFields.name\r\nid: ProfileFields.WHHYY\r\n}\r\n```\r\n\r\n**Playground Link:** [Provided](https://www.typescriptlang.org/play?ts=3.7.5#code/C4TwDgpgBAcgrgGwQQwEYIgHgCoD4oC8U2UAPlAHaIIBQNEAHmAPYBOwlyAthAM5jIAxtAAKrZgDMAlhgBiUiAgAmvKAG8aULYxbsooSJx6EovYKykUA5gG5N2pmw4HoAdQASATW8mzF62SU1HZaUDpO+uDQUkq+5pZWgVRIIVAA9GlhjnouUB7enibwSGgYmH4JuKkZWbrOUVAxRdSlWBXWVTQAvnThepbAEKwSQqLi0hjq9hTcEABcUGKSMhDyiioAdDM8qfneC0sTqwrKvBt7nqkxB+Mra6cbMXY9NDXYABbQAOIQFEPICEihgBQw4UlUAHdxAEAIT0bL1Qw-P6sAEmERSQQAa0whxWABooAByC5EwJE7YQMnkIkxIm4IA)\r\n","author":{"url":"https://github.com/LenChang","@type":"Person","name":"LenChang"},"datePublished":"2020-03-16T08:46:04Z","url":"https://github.com/microsoft/TypeScript/issues/37408"}
| 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:2d10c834-e75f-0141-f00d-fb0648fa9e20 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E82C:6DC60:27D9C32:325E8CA:6B01CA10 |
| html-safe-nonce | b629ed2c24c70726be518bfa184031a66ea972dfb445d72d3f0022b498f15156 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODJDOjZEQzYwOjI3RDlDMzI6MzI1RThDQTo2QjAxQ0ExMCIsInZpc2l0b3JfaWQiOiI5MTkwNjI3MTM0OTcwOTA3MTUyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 1e13cf168d7146071074d0f9999e7b5fa07b9fd416481ab208f9cb296132c001 |
| hovercard-subject-tag | issue:582109288 |
| 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/37408/issue_layout |
| twitter:image | https://opengraph.githubassets.com/37866872e9e352adb9c8d9e6ba02348955a328d0dbec0a79c700d377035e4f56/microsoft/TypeScript/issues/37408 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/37866872e9e352adb9c8d9e6ba02348955a328d0dbec0a79c700d377035e4f56/microsoft/TypeScript/issues/37408 |
| og:image:alt | TypeScript Version: 3.7.2 Search Terms: namespace, typing Code type Nullable |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | LenChang |
| 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