feat: live request url under the new system

This commit is contained in:
Andrew Bastin
2021-08-02 17:55:12 -04:00
parent 05f19cbb60
commit 10b7da0558
3 changed files with 114 additions and 1 deletions

View File

@@ -89,6 +89,13 @@ export function pluckRef<T, K extends keyof T>(ref: Ref<T>, key: K): Ref<T[K]> {
})
}
export function pluckMultipleFromRef<T, K extends Array<keyof T>>(
sourceRef: Ref<T>,
keys: K
): { [key in K[number]]: Ref<T[key]> } {
return Object.fromEntries(keys.map((x) => [x, pluckRef(sourceRef, x)])) as any
}
/**
* A composable that provides the ability to run streams
* and subscribe to them and respect the component lifecycle.