mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 17:30:59 +01:00
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
This commit is contained in:
parent
42a9431e70
commit
50dcc2aaa4
@ -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…
Reference in New Issue
Block a user