async getEvery(duration, start, end, every = 1, after = true) { return await Promise.all(dates.map((date) => this.getDate(date, after)dater.getEvery()函数调用的SyntaxError: await is only valid in
在使用NestJS REPL时,我得到了以下错误,尽管运行时遇到了一个异步函数,我看到这个函数返回了一个承诺。Uncaught SyntaxError: await is only valid in async function async findOne(id: string) {
const coffee = await this.cof
只要我使用ECMAScript模块,并且在我的package.json类型中设置为等于模块,它就能正常工作:import {promises as fs} from 'fs';
const result = await fs.readFile('input.txt', {encoding:'utf-8'});console.log(awai