import { K } from './db' ; /**
 * Keys are formatting helpers for inserting into the database.
 */ export interface Key { param args returns encode ( ... args ) : K ; param key returns decode ( key ) : any [ ] ; param args returns min ( ... args ) : K ; param args returns max ( ... args ) : K ; } export interface KeyType { min : string | number | Buffer ; max : string | number | Buffer ; dynamic : boolean ; size ( value ? ) : number ; read ( key , offset ) : any ; write ( key , value , offset ) : any ; }