INNER CODE UNIT · TypeScript

Promise

sensedeep/dynamodb-onetable · samples/typescript/src/index.ts:207

    return new Promise(function (resolve, reject) {
        setTimeout(() => resolve(true), time)
    })
}

async function main() {
    await start()
    try {
        await test()
    } catch (err) {
        console.error(err)
    }
    await stop()
}

//  Ah, if only for a top-level await
main()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…