https://pulumi.com logo
#typescript
Title
# typescript
s

steep-toddler-94095

06/08/2021, 7:50 AM
should be able to use
pulumi.all
for this
Copy code
const asdf = [] as Array<Output<string>>
pulumi.all(asdf).apply(x=>x) // x will be type string[] here
l

little-cartoon-10569

06/08/2021, 8:41 PM
I think you might need to use
pulumi.all(...asdf)
?
s

steep-toddler-94095

06/08/2021, 9:03 PM
that would run into a compile error since
all
cannot take a variable number of inputs. This is the overload we are targeting by passing in an array
Copy code
export declare function all<T>(ds: (Input<T> | undefined)[]): Output<Unwrap<T>[]>;
l

little-cartoon-10569

06/08/2021, 9:16 PM
Ah yes. Have you managed to get it working? Do you need to do something like convert an Array<Output<string>> to an Output<Array<string>>?
s

steep-toddler-94095

06/08/2021, 10:06 PM
Did you mean to ask @gorgeous-country-43026? I should have threaded my initial message to him
l

little-cartoon-10569

06/08/2021, 10:24 PM
Heh sorry, I thought this was a question 🙂
😄 1