From: Eduardo San Martin Morote Date: Thu, 4 Mar 2021 15:27:31 +0000 (+0100) Subject: refactor: dead code X-Git-Tag: v0.2.0~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bcc1e00b8a0c05fe59668f247bf7a54a1653d159;p=thirdparty%2Fvuejs%2Fpinia.git refactor: dead code --- diff --git a/src/store.ts b/src/store.ts index cd5c411a..15042c6d 100644 --- a/src/store.ts +++ b/src/store.ts @@ -77,22 +77,6 @@ function computedFromState( return reactiveObject } -function toComputed(refObject: Ref) { - // let asComputed = computed() - const reactiveObject = {} as { - [k in keyof T]: Ref - } - for (const key in refObject.value) { - // @ts-ignore: the key matches - reactiveObject[key] = computed({ - get: () => refObject.value[key as keyof T], - set: (value) => (refObject.value[key as keyof T] = value), - }) - } - - return reactiveObject -} - /** * Creates a store with its state object. This is meant to be augmented with getters and actions *