little-cartoon-10569
10/17/2022, 4:57 AMinterface Person { age: number; name: string}
that other projects can use when dereferencing a stack reference.
My assumption is that it's not worth trying to use the Person interface in the exporting project. I shouldn't try to put this in my parent project's index.ts:
export steve: Person = { age: steve.age, name: steve.name };
Instead, I should be happy with this:
export steve = { age: steve.age, name: steve.name };
I assume that the type wrangling I'd have to go through to make the one interface usable in both places is likely to be complicated, and to hide intent. In the parent project, the interface would contain a pile of `pulumi.Output`s (from all the resources providing the values I want to export)). In the dependent projects, all the values are known at the same time so the only Output I need in code is the one wrapping the Person object(const steve: pulumi.Output<Person> = stackref.requireOutput("steve") as pulumi.Output<Person>
).
Is there an easy / clear way to use the one interface in both places? Am I correct in not even trying?victorious-church-57397
10/17/2022, 6:21 AMlittle-cartoon-10569
10/17/2022, 8:04 AM