Function: unapplySeeds()
ts
function unapplySeeds(container: Container, seeds: SeedEntries): void;Defined in: src/wirestate-core/seeds/unapply-seeds.ts:34
Removes targeted seed values from a container.
Parameters
| Parameter | Type | Description |
|---|---|---|
container | Container | Container to update. |
seeds | SeedEntries | Seed entries whose keys should be removed. |
Returns
void
Remarks
This removes by key. The seed values in seeds are ignored.
Example
typescript
import { Injectable, createContainer, unapplySeeds } from "@wirestate/core";
@Injectable()
class CounterService {}
const container = createContainer({
seeds: [[CounterService, { count: 10 }]],
});
unapplySeeds(container, [[CounterService, { count: 10 }]]);