TypeScript newbie here, so forgive the simple ques...
# typescript
TypeScript newbie here, so forgive the simple question. The example usage for the
function in
shows the use of the
function to access the data returned by the function. However, the only way I was able to make it work was without the
function, like so:
Copy code
const rawAzInfo = aws.getAvailabilityZones({
    state: "available",
let azNames: Array<string> = rawAzInfo.names;
let numberOfAZs: number = azNames.length;
Am I missing/overlooking/not understanding something? Or is this an error in the docs?
The examples should work as written - if you can point at the specific one that doesn't - we could take a look. The change to make it so that the code you have above works as written is very recent, and we will be working on updating all examples to use this (simpler) approach.
That example may work as written, but for what I was trying to do (ascertain the number of AZs in the configured region) I could never make it work.
Got it. Yes - we will make sure to update all the examples to use the simpler synchronous approach once it has been rolled out to all providers.
👍🏻 1