From a356c3f676d53eb63d162d21469b595f4921130d Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Fri, 14 Oct 2022 07:44:12 -0500 Subject: [PATCH] Fix a couple type issues --- src/util/computed.ts | 2 +- src/util/proxies.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/computed.ts b/src/util/computed.ts index 7ee0930..59db8ab 100644 --- a/src/util/computed.ts +++ b/src/util/computed.ts @@ -38,7 +38,7 @@ export function processComputable>( // @ts-ignore obj[key] = computed(computable.bind(obj)); } else if (isFunction(computable)) { - obj[key] = computable.bind(obj); + obj[key] = computable.bind(obj) as T[S]; // eslint-disable-next-line @typescript-eslint/no-explicit-any (obj[key] as any)[DoNotCache] = true; } diff --git a/src/util/proxies.ts b/src/util/proxies.ts index 065a314..a41b8d1 100644 --- a/src/util/proxies.ts +++ b/src/util/proxies.ts @@ -17,7 +17,7 @@ export type ProxiedWithState = NonNullable extends Record( +export function createLazyProxy( objectFunc: (baseObject: S) => T & S, baseObject: S = {} as S ): T {