Title: Async / await with Bluebird promises · Issue #8331 · microsoft/TypeScript · GitHub
Open Graph Title: Async / await with Bluebird promises · Issue #8331 · microsoft/TypeScript
X Title: Async / await with Bluebird promises · Issue #8331 · microsoft/TypeScript
Description: In TypeScript 1.9.0-dev.20160426 I tried: import * as Promise from 'bluebird'; async function test() { await Promise.delay(1000); } test(); The compiler reports: error TS2529: Duplicate identifier 'Promise'. Compiler reserves name 'Promi...
Open Graph Description: In TypeScript 1.9.0-dev.20160426 I tried: import * as Promise from 'bluebird'; async function test() { await Promise.delay(1000); } test(); The compiler reports: error TS2529: Duplicate identifier ...
X Description: In TypeScript 1.9.0-dev.20160426 I tried: import * as Promise from 'bluebird'; async function test() { await Promise.delay(1000); } test(); The compiler reports: error TS2529: Duplicate ide...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/8331
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Async / await with Bluebird promises","articleBody":"In TypeScript 1.9.0-dev.20160426 I tried:\n\n```\nimport * as Promise from 'bluebird';\n\nasync function test() {\n await Promise.delay(1000);\n}\n\ntest();\n```\n\nThe compiler reports:\n\n`error TS2529: Duplicate identifier 'Promise'. Compiler reserves name 'Promise' in top level scope of a module containing async functions.`\n\nEspecially since this is purely for Node.js, I'd like to use Bluebird promises for their debuggability and import them as `Promise` instead of some other name.\n\nCould I provide my own `__awaiter` or could the default one use the imported `Promise`?\n","author":{"url":"https://github.com/jjrv","@type":"Person","name":"jjrv"},"datePublished":"2016-04-27T10:15:08Z","url":"https://github.com/microsoft/TypeScript/issues/8331"}
| 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:bc3e9c61-0ef0-350c-dfe5-6851b03b4c91 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E09A:311640:3270E3:413D13:6B00D0EB |
| html-safe-nonce | 7420dd2a29aebeaae5c708e6292f68f030f5b3a5bd3a28abe36afc7404acce65 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDlBOjMxMTY0MDozMjcwRTM6NDEzRDEzOjZCMDBEMEVCIiwidmlzaXRvcl9pZCI6IjQwODAxMjU3MjM2MTQ5NTc4MDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9bd73402910de514369a89572657a3e6e132d23a63082512d7a863278125c815 |
| hovercard-subject-tag | issue:151349998 |
| 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/8331/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3010e5a4772c99f1ee96353d62368c15e3307240e0f5abca1aef44c3a8add2e0/microsoft/TypeScript/issues/8331 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3010e5a4772c99f1ee96353d62368c15e3307240e0f5abca1aef44c3a8add2e0/microsoft/TypeScript/issues/8331 |
| og:image:alt | In TypeScript 1.9.0-dev.20160426 I tried: import * as Promise from 'bluebird'; async function test() { await Promise.delay(1000); } test(); The compiler reports: error TS2529: Duplicate identifier ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jjrv |
| hostname | github.com |
| expected-hostname | github.com |
| None | 85bbdfe2b6ba16e234513bc6ceff5d848ef8449820c900692a2b4e67061931e5 |
| 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 | 4943239a6d2c591325dad6e5c313e1cafda877f6 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width