sparse-intern-71089
05/06/2020, 7:03 PMgreen-school-95910
05/06/2020, 7:12 PMproject.apply(p => p.projectId)green-school-95910
05/06/2020, 7:13 PMlimited-rainbow-51650
05/06/2020, 7:16 PMany.limited-rainbow-51650
05/06/2020, 7:17 PMconstructor(project: <which type here?>)green-school-95910
05/06/2020, 7:19 PMInput<Project|GetProjectResult> and then do project = output(project) before using it on your componentlimited-rainbow-51650
05/06/2020, 7:29 PM| character made me think about having or-types to indicate one or the other:
constructor(project: gcp.organizations.Project | Promise<gcp.organizations.GetProjectResult>)
My editor is not complaining… will see how far I can get with this.green-school-95910
05/06/2020, 7:30 PMInput wrapping them on the argument list to allow the values to be passed both directly, as promise or as outputlimited-rainbow-51650
05/06/2020, 7:33 PMInput or is there also another technical thing I’m missing here?green-school-95910
05/06/2020, 7:36 PMInput<Project|GetProjectResult> is the same as Project | GetProjectResult | Promise<Project | GetProjectResult> | Output<Project | GetProjectResult>
So it will accept resources created inside an apply, in a promise chain or directlygreen-school-95910
05/06/2020, 7:37 PMgetSomeConfigsExternally().then(config => new Project(projectId: config.projectId))