sparse-intern-71089
05/26/2022, 6:06 PMorange-policeman-59119
05/27/2022, 6:59 AMas Output<string>
, or if that doesn't work, as any as Output<string>
.
A helper library like this one contains type guards like "is.string". You'd need to use that inside an Apply and decide how to handle the else case - throwing an error in the Apply would work.
https://www.npmjs.com/package/@sindresorhus/isorange-policeman-59119
05/27/2022, 7:00 AMrequireOutput(...).apply(x => {
if is.string(x) {
return x;
} else {
throw new Error("expected a string!")
});
kind-room-82948
05/31/2022, 6:23 PMexport = async () => {
const pulumiStackReference = new pulumi.StackReference(`otherStack`);
const myOutput = await pulumiStackReference.requireOutputValue('myOutput')
}