UNPKG

nanostores

Version:

A tiny (265 bytes) state manager for React/Preact/Vue/Svelte with many atomic tree-shakable stores

25 lines (22 loc) 556 B
import type { MapCreator } from '../map-creator/index.js' import type { Store } from '../map/index.js' export const clean: unique symbol /** * Destroys all cached stores and call * * It also reset all tasks by calling {@link cleanTasks}. * * ```js * import { cleanStores } from 'nanostores' * * afterEach(() => { * cleanStores($router, $settings) * }) * ``` * * @param stores Used store classes. * @return Promise for stores destroying. */ export function cleanStores( ...stores: (MapCreator<any, any[]> | Store | undefined)[] ): void