This message was deleted.
# general
s
This message was deleted.
g
Doh, I’m a typescript beginner and I’m struggling with converting my
Map<string, number
(I would like to pass port name -> port number mapping that I could then use to generate an array of core.v1.ContainerPort instances 😞
i
👍, I would like this as well. It's not hard to return an object shaped like a
ContainerPort
from a helper function and TypeScript will DTRT, but it'd be nicer to be able to strongly type everything.
c
@gifted-island-55702 @important-carpenter-15282 this is an interesting use case… would you mind filing a bug?
I hadn’t really thought of this.
g
I will open a ticket - thanks @creamy-potato-29402
c
@gifted-island-55702 @important-carpenter-15282 actually, I lied — this already is possible.
import * as inputApi from "@pulumi/kubernetes/types/input"
there are technically two shapes — the “input shape” which is the set of properties required at submission time, and the “output shape” which is the set of properties required when you get the resource definition from the API server.
g
Thank you @creamy-potato-29402 - I wasn’t aware I could import it like this (I’m still typescript newbie)