We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The generated JS code is missing a dependency onto the references promise implementation. Steps to reproduce:
declare module 'bluebird' { interface Promise<T> { then<U>(onFulfilled: (value: T) => U, onRejected: (reason: any) => U): Promise<T>; } var Promise: { new<T>(resolver: (resolve: (value: T) => void, reject: (reason: any) => void) => void): Promise<T>; } }
import * as bluebird from 'bluebird'; async function firstName(): bluebird.Promise<string> { return "Dirk"; } async function lastName(): Promise<string> { return "Baeumer"; } async function use() { var first = await firstName(); var last = await lastName(); return `${first} ${last}`; } if (require.main === module) { var p = use(); p.then((value) => console.log(value)); }
Observe: you get an exception. Problem is that the generated code is missing a
var bluebird = require('bluebird');
statement.
The text was updated successfully, but these errors were encountered:
I believe this is fixed in latest, @DickvdBrink can you give typescript@next a try?
typescript@next
Sorry, something went wrong.
@mhegazy, I definitely can but you probably mean @dbaeumer ;)
yes. sorry @DickvdBrink.
No branches or pull requests
The generated JS code is missing a dependency onto the references promise implementation. Steps to reproduce:
Observe: you get an exception. Problem is that the generated code is missing a
statement.
The text was updated successfully, but these errors were encountered: