https://pulumi.com logo
#typescript
Title
# typescript
g

gentle-application-59272

02/13/2024, 8:20 AM
so here's a weird one to do with
apply
on outputs with a
mediapackage.Channel
the output
hlsIngests
is doing weird stuff. In the following code the type of
ingsests
is meant to be
ChannelHlsIngest[]
but instead I get something like this
Copy code
{
  4dabf18193072939515e22adb298388d: unknown; // i didn't check this
  value: ChannelHlsIngest[]
}
Copy code
channel.hlsIngests.apply((ingests) => ingests.map(...))

TypeError: ingests.map is not a function
https://www.pulumi.com/registry/packages/aws/api-docs/mediapackage/channel/#channelhlsingest As far as i can tell this was working just fine ~ 2 months ago. I've had to 'fix' it by doing
Copy code
.apply((ingests) => ((ingests as any).value as types.output.mediapackage.ChannelHlsIngest[]).map(...))
We haven't changed any package or pulumi versions since we last ran that, i don't think 😕