What I really wanted was `pulumi.all({http, https}...
# general
h
What I really wanted was
pulumi.all({http, https}): Output<{http: ..., https: ,,,}>
w
Cc @lemon-spoon-91807 who probably has thoughts on what’s best currently, and what we might add in the future to make some of these common patterns simpler.
πŸ‘ 1
l
i'm missing context.... but
pulumi.output({http, https})
should work.
it will give you an
Output<{http: Unwrapped..., https: Unwrapped...}>
h
http
has type
Output<Listener>
though
w
@lemon-spoon-91807 see the thread of questions leading up to this in the channel for context.
l
can you supply a gist? i'd like to examine first hand. Thanks!
looking closely at the original post, i'd just repeat my first claim. specifically i think
pulumi.output({http, https})
will give you what you want.
it will give you the
Output<{http: ..., https: ...}>
type you are asking for
h
Ok, let me try it!
l
but i can't say for certain without having a gist to try out πŸ™‚
if you find that it doesn't work, def let me know and i'll investigate right away πŸ™‚
h
yeh that seesm to work - thank you
l
Terrific! While it's not a 100% replacement, pulumi.output is now the general purpose replacement for pulumi.all
it generally has the strictly better behavior that you want most of the time.
pulumi.all is more like a 'shallow' unwrapping of your value. while pulumi.output is a 'deep' unwrapping
most of hte time the latter is more appropriate.
h
yeh i see that it seems to cove most case
cooll i didnt know about it - thanks a bunch
l
one downside is simply that we're really exploiting some very complex TypeScript features. so sometimes when it doesn't do what you want... the error messages can be a bit... daunting πŸ™‚
h
BTW I love using all these higher-order types in real code - awesome API you guys have
l
you're welcome. have a good day!
Awesome to hear. We like it too πŸ™‚
h
I once got GHC to produce a 9k line error message so I'm not too nervous haha
l
You wouldn't happen to have a copy of that? I'd love to see it πŸ˜„
h
hehe sadly no, it was a long time ago.