import { KeyFunc } from "../util/keyed-array-diff" ; import { State } from "./state" ; import { SimpleDeep , DeepChildFactory , DeepAccessor } from "./simple-deep" ; import { KeyedDeep } from "./keyed-deep" ; import { EqualityFunc } from "." ; export function deep ( state ) ; export function deep ( state , key ) ; param state param key export function deep ( state , key ? ) { if ( key ) return new KeyedDeep ( state , key ) ; else return new SimpleDeep ( state ) ; } param keyfunc export function keyed ( keyfunc ) { return ( accessor , compare ) => new KeyedDeep ( accessor , keyfunc , compare ) ; } export default deep ;