https://pulumi.com logo
b

best-xylophone-83824

08/12/2019, 9:27 AM
What is recommended way to deal with .getOutput("...") result in typescript? For now I do
.getOutput("...") as pulumi.Output<InterfaceIExpect>
which is probably not very change safe. I am not sure it is possible, I am not fluent with TypeScript, but it would be really nice if Pulumi exported type definitions too and did
require
them inside
getOutput
, this way result would by typed and any breaking changes in shape of exported object would be caught at plan stage
w

white-balloon-205

08/12/2019, 3:20 PM
One approach is you could define your types in a shared module/package that you import at both the producer and consumer.
b

best-xylophone-83824

08/12/2019, 3:20 PM
thats what gives static typing a bad reputation 🙂 too much hassle