sparse-intern-71089
04/02/2021, 10:18 AMlittle-cartoon-10569
04/03/2021, 6:09 AMpulumi.output(x as Promise<X>)
is going to be an Output<Promise<X>
.
Rather, everywhere that you might use an Output or Promise actually takes an Input, which is a union type including both the Output and the Promise. So you can just ignore the requirement for an Output, and use the Promise directly.little-cartoon-10569
04/03/2021, 6:11 AMconst output = new Promise<Map<string, string>>((resolve, reject) => new Map<string, string>());
And use that output variable anywhere that needs an Input.gifted-island-55702
04/06/2021, 7:24 AMlittle-cartoon-10569
04/06/2021, 8:44 PMx | Promise<x> | Output<x>
. You can export strings, Promises of lists, Outputs of numbers.. whatever you like.little-cartoon-10569
04/06/2021, 8:47 PM