docs: fix store contract type signature

The store contract documentation states that the subscribe method "must return an unsubscribe function", but its signature suggested that it instead took a second, unit argument then returned `void`. This PR adds parentheses to reflect the intended meaning. 

I haven't given a name to the unit argument to the unsubscribe function.
pull/4539/head
Joseph Abrahamson 6 years ago committed by GitHub
parent 91d758e35b
commit 26f0bad7b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -175,7 +175,7 @@ Local variables (that do not represent store values) must *not* have a `$` prefi
##### Store contract
```js
store = { subscribe: (subscription: (value: any) => void) => () => void, set?: (value: any) => void }
store = { subscribe: (subscription: (value: any) => void) => (() => void), set?: (value: any) => void }
```
You can create your own stores without relying on [`svelte/store`](docs#svelte_store), by implementing the *store contract*:

Loading…
Cancel
Save