class As {
    constructor() {}

    then(resolve, reject) {
        setTimeout(() => {
            resolve(true);
        }, 3000)
    }
}

(async () => {
    const b = await new As();
    console.log(b);
})()
分类: JavaScript 标签: awaitclass

评论

暂无评论数据

暂无评论数据

目录