What is recommended way to deal with .getOutput("....
# general
b
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
One approach is you could define your types in a shared module/package that you import at both the producer and consumer.
b
thats what gives static typing a bad reputation 🙂 too much hassle