mirror of https://github.com/sveltejs/svelte
I wrote a custom store to have a more flexible `derived` store. The function signatures looks like:
```typescript
export function derivedWritable<S extends Stores, T>(
stores: S,
fn: (values: StoresValues<S>, set: (value: T) => void) => Unsubscriber | void,
initial_value?: T
): Writable<T> { ... }
```
Both `Stores` and `StoresValues` are not exported in `svelte/store`. I had to copy paste the type definition from this file and duplicate code. Unless I'm using TypeScript wrong (I'm still quite new to it), I think these types plus few others should be exported.
pull/7358/head
parent
2f71bc9333
commit
5a0fb7ddae
Loading…
Reference in new issue