Merge pull request #1131 from glutanimate/fix-asyncreactivedata-typo

Fix minor typo
This commit is contained in:
Damien Elmes 2021-04-16 11:58:58 +10:00 committed by GitHub
commit 7165d06bf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,7 @@
import { Readable, derived } from "svelte/store";
interface AsyncReativeData<T, E> {
interface AsyncReactiveData<T, E> {
value: Readable<T | null>;
error: Readable<E | null>;
loading: Readable<boolean>;
@ -12,7 +12,7 @@ interface AsyncReativeData<T, E> {
function useAsyncReactive<T, E>(
asyncFunction: () => Promise<T>,
dependencies: [Readable<unknown>, ...Readable<unknown>[]]
): AsyncReativeData<T, E> {
): AsyncReactiveData<T, E> {
const promise = derived(
dependencies,
(_, set: (value: Promise<T> | null) => void): void => set(asyncFunction()),