import { Stream } from 'effection' ; /**
 * A slice represents a piece of the atom. Each part of the state can be
 * updated and retrieved. Any update will cause the entire state of the atom to
 * be updated.
 */ export interface Slice < S > extends Stream < S > { /**
     * Retrieve the current value of the slice
     */ get ( ) : S ; /**
     * Set the value of the slice to the given value
     */ set ( value ) : void ; param fn update ( fn ) : void ; /**
     * Return a new  Slice for the given path.
      slice : MakeSlice < S > ; /**
     * Remove this slice from its parent
     */ remove ( ) : void ; /**
     * Return a stream for this slice. Convenient for destructuring assignment.
     *
     * ### Example
     *
     * ```typescript
     * import { main } from 'effection';
     * import { createAtom } from '@effection/atom';
     *
     * main(function*() {
     *   let { stream, set } = createAtom(0);
     *
     *   yield spawn(stream.forEach((number) => console.log(number)));
     *   set(1);
     * });
     * ```
     */ stream : Stream < S > ; } export interface MakeSlice < S > { ( ) : S ; < Key extends keyof S > ( key ) : Slice < S [ Key ] > ; < Key1 extends keyof S , Key2 extends keyof S [ Key1 ] > ( key1 , key2 ) : Slice < S [ Key1 ] [ Key2 ] > ; < Key1 extends keyof S , Key2 extends keyof S [ Key1 ] , Key3 extends keyof S [ Key1 ] [ Key2 ] > ( key1 , key2 , key3 ) : Slice < S [ Key1 ] [ Key2 ] [ Key3 ] > ; < Key1 extends keyof S , Key2 extends keyof S [ Key1 ] , Key3 extends keyof S [ Key1 ] [ Key2 ] , Key4 extends keyof S [ Key1 ] [ Key2 ] [ Key3 ] > ( key1 , key2 , key3 , key4 ) : Slice < S [ Key1 ] [ Key2 ] [ Key3 ] [ Key4 ] > ; < Key1 extends keyof S , Key2 extends keyof S [ Key1 ] , Key3 extends keyof S [ Key1 ] [ Key2 ] , Key4 extends keyof S [ Key1 ] [ Key2 ] [ Key3 ] , Key5 extends keyof S [ Key1 ] [ Key2 ] [ Key3 ] [ Key4 ] > ( key1 , key2 , key3 , key4 , key5 ) : Slice < S [ Key1 ] [ Key2 ] [ Key3 ] [ Key4 ] [ Key5 ] > ; < Key1 extends keyof S , Key2 extends keyof S [ Key1 ] , Key3 extends keyof S [ Key1 ] [ Key2 ] , Key4 extends keyof S [ Key1 ] [ Key2 ] [ Key3 ] , Key5 extends keyof S [ Key1 ] [ Key2 ] [ Key3 ] [ Key4 ] , Key6 extends keyof S [ Key1 ] [ Key2 ] [ Key3 ] [ Key4 ] [ Key5 ] > ( key1 , key2 , key3 , key4 , key5 , key ) : Slice < S [ Key1 ] [ Key2 ] [ Key3 ] [ Key4 ] [ Key5 ] [ Key6 ] > ; < Key1 extends keyof S , Key2 extends keyof S [ Key1 ] , Key3 extends keyof S [ Key1 ] [ Key2 ] , Key4 extends keyof S [ Key1 ] [ Key2 ] [ Key3 ] , Key5 extends keyof S [ Key1 ] [ Key2 ] [ Key3 ] [ Key4 ] , Key6 extends keyof S [ Key1 ] [ Key2 ] [ Key3 ] [ Key4 ] [ Key5 ] , Key7 extends keyof S [ Key1 ] [ Key2 ] [ Key3 ] [ Key4 ] [ Key5 ] [ Key6 ] > ( key1 , key2 , key3 , key4 , key5 , key , key7 ) : Slice < S [ Key1 ] [ Key2 ] [ Key3 ] [ Key4 ] [ Key5 ] [ Key6 ] [ Key7 ] > ; < Key1 extends keyof S , Key2 extends keyof S [ Key1 ] , Key3 extends keyof S [ Key1 ] [ Key2 ] , Key4 extends keyof S [ Key1 ] [ Key2 ] [ Key3 ] , Key5 extends keyof S [ Key1 ] [ Key2 ] [ Key3 ] [ Key4 ] , Key6 extends keyof S [ Key1 ] [ Key2 ] [ Key3 ] [ Key4 ] [ Key5 ] , Key7 extends keyof S [ Key1 ] [ Key2 ] [ Key3 ] [ Key4 ] [ Key5 ] [ Key6 ] , Key8 extends keyof S [ Key1 ] [ Key2 ] [ Key3 ] [ Key4 ] [ Key5 ] [ Key6 ] [ Key7 ] > ( key1 , key2 , key3 , key4 , key5 , key , key7 , key8 ) : Slice < S [ Key1 ] [ Key2 ] [ Key3 ] [ Key4 ] [ Key5 ] [ Key6 ] [ Key7 ] [ Key8 ] > ; }