📅  最后修改于: 2022-03-11 14:59:55.594000             🧑  作者: Mango
async function promHandler(
prom: Promise
): Promise<[T | null, any]> {
try {
return [await prom, null];
} catch (error) {
return [null, error];
}
}