Tweak signature of .apply to help TS infer things better. (#2520)

This commit is contained in:
CyrusNajmabadi 2019-03-06 01:53:58 -08:00 committed by GitHub
parent f0d8cd89cd
commit d6d839608b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -1,7 +1,13 @@
## 0.17.1 (unreleased)
## 0.17.2 (unreleased)
### Improvements
## 0.17.1 (Released March 6, 2019)
### Improvements
- Slight tweak to `Output.apply` signature to help TypeScript infer types better.
## 0.17.0 (Released March 5, 2019)
This update includes several changes to core `@pulumi/pulumi` constructs that will not play nicely

View file

@ -510,7 +510,9 @@ export interface OutputInstance<T> {
* available for functions that end up executing in the cloud during runtime. To get the value
* of the Output during cloud runtime execution, use `get()`.
*/
apply<U>(func: (t: T) => Input<U>): Output<U>;
apply<U>(func: (t: T) => Promise<U>): Output<U>;
apply<U>(func: (t: T) => OutputInstance<U>): Output<U>;
apply<U>(func: (t: T) => U): Output<U>;
/**
* Retrieves the underlying value of this dependency.