]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
refactor: dead code
authorEduardo San Martin Morote <posva13@gmail.com>
Thu, 4 Mar 2021 15:27:31 +0000 (16:27 +0100)
committerEduardo San Martin Morote <posva13@gmail.com>
Mon, 8 Mar 2021 14:50:09 +0000 (15:50 +0100)
src/store.ts

index cd5c411af2b6a0e23f2eca884560247b4b4e19c9..15042c6d6df8d5bf267501c98cffde010e0c1fb6 100644 (file)
@@ -77,22 +77,6 @@ function computedFromState<T, Id extends string>(
   return reactiveObject
 }
 
-function toComputed<T>(refObject: Ref<T>) {
-  // let asComputed = computed<T>()
-  const reactiveObject = {} as {
-    [k in keyof T]: Ref<T[k]>
-  }
-  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
  *