This commit is contained in:
Alex.F 2021-08-16 00:21:12 +08:00
parent d13f6ba750
commit 6b3a6ddb39

View file

@ -131,7 +131,7 @@ export function setContextValue(key: string, value: any): Thenable<void> {
export function memoizeAsync<Ret, TThis, Param extends string>(func: (this: TThis, arg: Param) => Promise<Ret>) {
const cache = new Map<string, Ret>();
return async function (this: TThis, arg: Param) {
return async function(this: TThis, arg: Param) {
const cached = cache.get(arg);
if (cached) return cached;