diff --git a/CHANGELOG.md b/CHANGELOG.md index 518fa2e..627a9a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## Unreleased +- Fixed incorrect TypeScript definition for async `derived` ([#25](https://github.com/PixievoltNo1/svelte-writable-derived/issues/25)) - Now supports Svelte 5 (-next.94 and later) In Svelte 5, this package does not use runes and continues to use the original writable store interface, which is not deprecated. I may release a separate package that uses runes. diff --git a/index.d.ts b/index.d.ts index 79782a4..b2dbfff 100644 --- a/index.d.ts +++ b/index.d.ts @@ -42,7 +42,7 @@ export default function writableDerived( export default function writableDerived( origins: S, - derive: (values: StoresValues, set: (value: T) => void, update: Updater) => void, + derive: (values: StoresValues, set: (value: T) => void, update: (fn: Updater) => void) => void, reflect: (reflecting: T, old: StoresValues) => SetValues, initial?: T ): Writable;