I'm using TypeScript But I have This Error:
[ts] Cannot find name 'async'
And This is my Code:
async someAsyncCode() {
let asyncFn = () => {
return new Promise((resolve: Function) => { resolve(2); });
}
// should log `2`
console.log(await asyncFn());
}
via Sedric Heidarizarei
No comments:
Post a Comment