chore: 使用命令更新内存订阅

This commit is contained in:
lisonge
2023-09-27 15:11:28 +08:00
parent 5681a481a0
commit 987397bd2f
3 changed files with 70 additions and 1 deletions

7
src/utils.ts Normal file
View File

@@ -0,0 +1,7 @@
export const tryRun = <T>(fc: () => T, fallbackFc: (e: unknown) => T) => {
try {
return fc();
} catch (e) {
return fallbackFc(e);
}
};