Yes - this does appear to be a case of TypeScript contextual typing not flowing as well as you might hope.
You can fix by inserting a cast - for instance just
as aws.iam.PolicyStatement[]
on the second to last line.
w
worried-engineer-33884
09/10/2019, 5:11 PM
ok i'll do that — is there an opportunity for the interface to be improved to accommodate this? or is it purely a TS quirk?