steep-angle-29984
06/17/2020, 9:19 AMfunction getValue(optionalValue: pulumi.Input<number | undefined>, defaultValue: pulumi.Input<number>): pulumi.Input<number> {
return pulumi.output(optionalValue).apply( v => {
return v ?? defaultValue
})
}
Error:(91, 9) TS2322: Type 'Output<Input<number>>' is not assignable to type 'Input<number>'.
Type 'OutputInstance<Input<number>>' is not assignable to type 'Input<number>'.
Type 'OutputInstance<Input<number>>' is not assignable to type 'OutputInstance<number>'.
Type 'Input<number>' is not assignable to type 'number'.
Type 'Promise<number>' is not assignable to type 'number'.No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by