Hi, I guess it's more of a Typescript thing but F...
# azure
b
Hi, I guess it's more of a Typescript thing but For type like
*readonly* identity: pulumi.Output<outputs.web.ManagedServiceIdentityResponse | undefined>;
How do I put them into another
Input
type? I would get
Copy code
Type 'Output<string | undefined>' is not assignable to type 'Input<string>'.
  Type 'OutputInstance<string | undefined>' is not assignable to type 'Input<string>'.
    Type 'OutputInstance<string | undefined>' is not assignable to type 'OutputInstance<string>'.
      Type 'string | undefined' is not assignable to type 'string'.
        Type 'undefined' is not assignable to type 'string'.ts(2322)
b
You can normally pass Outputs as Inputs, the error you’re getting is with the inner type conversion since on the Output side it might be undefined. You might be able to do something like this if you’re okay with moving that condition out to the read-only property itself:
Copy code
readonly identity?: pulumi.Output<outputs.web.ManagedServiceIdentityResponse>;
though you’ll probably want logic to deal with what happens if its not actually provided wherever this is being used.
b
thank you, that definitely makes sense to me. but this is the
azure-native
package, which I can't update. with that, what can I do to work it around?