@@ -127,15 +127,12 @@ export interface CheckLoop {
127127 ( entityKey : string , pk : string , input : object ) : boolean ;
128128}
129129
130- /** Return all entity PKs for a given entity key or INVALID if no entity entries */
131- export interface GetEntityKeys {
132- ( key : string ) : string [ ] | symbol ;
130+ /** Interface specification for entities state accessor */
131+ export interface EntitiesInterface {
132+ keys ( ) : IterableIterator < string > ;
133+ entries ( ) : IterableIterator < [ string , any ] > ;
133134}
134135
135- /** Loop over all entities of a given key */
136- export interface ForEntities {
137- ( key : string , callbackfn : ( value : [ string , unknown ] ) => void ) : boolean ;
138- }
139136/** Get normalized Entity from store */
140137export interface GetEntity {
141138 ( key : string , pk : string ) : any ;
@@ -148,10 +145,8 @@ export interface GetIndex {
148145
149146/** Accessors to the currently processing state while building query */
150147export interface IQueryDelegate {
151- /** Return all entity PKs for a given entity key or INVALID if no entity entries */
152- getEntityKeys : GetEntityKeys ;
153- /** Loop over all entities of a given key */
154- forEntities : ForEntities ;
148+ /** Get all entities for a given schema key */
149+ getEntities ( key : string ) : EntitiesInterface | undefined ;
155150 /** Gets any previously normalized entity from store */
156151 getEntity : GetEntity ;
157152 /** Get PK using an Entity Index */
@@ -164,10 +159,8 @@ export interface IQueryDelegate {
164159export interface INormalizeDelegate {
165160 /** Action meta-data for this normalize call */
166161 readonly meta : { fetchedAt : number ; date : number ; expiresAt : number } ;
167- /** Return all entity PKs for a given entity key or INVALID if no entity entries */
168- getEntityKeys : GetEntityKeys ;
169- /** Loop over all entities of a given key */
170- forEntities : ForEntities ;
162+ /** Get all entities for a given schema key */
163+ getEntities ( key : string ) : EntitiesInterface | undefined ;
171164 /** Gets any previously normalized entity from store */
172165 getEntity : GetEntity ;
173166 /** Updates an entity using merge lifecycles when it has previously been set */
0 commit comments