nanostores
Version:
A tiny (265 bytes) state manager for React/Preact/Vue/Svelte with many atomic tree-shakable stores
18 lines (16 loc) • 396 B
TypeScript
import type { MapCreator } from '../map-creator/index.js'
import type { Store } from '../map/index.js'
/**
* Prevent destructor call for the store.
*
* Together with {@link cleanStores} is useful tool for tests.
*
* ```js
* import { keepMount } from 'nanostores'
*
* keepMount($store)
* ```
*
* @param $store The store.
*/
export function keepMount($store: MapCreator | Store): void