chore: add `this: void` typing to store functions (#6094)

This is necessary so ESLint does not complain about possibly unbound method access
fixes https://github.com/sveltejs/eslint-plugin-svelte3/issues/102
pull/6128/head
JounQin 4 years ago committed by GitHub
parent 42a9431e70
commit 50dcc2aaa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -22,7 +22,7 @@ export interface Readable<T> {
* @param run subscription callback
* @param invalidate cleanup callback
*/
subscribe(run: Subscriber<T>, invalidate?: Invalidator<T>): Unsubscriber;
subscribe(this: void, run: Subscriber<T>, invalidate?: Invalidator<T>): Unsubscriber;
}
/** Writable interface for both updating and subscribing. */
@ -31,13 +31,13 @@ export interface Writable<T> extends Readable<T> {
* Set value and inform subscribers.
* @param value to set
*/
set(value: T): void;
set(this: void, value: T): void;
/**
* Update value using callback and inform subscribers.
* @param updater callback
*/
update(updater: Updater<T>): void;
update(this: void, updater: Updater<T>): void;
}
/** Pair of subscriber and invalidator. */

Loading…
Cancel
Save