@@ -2,12 +2,10 @@ import { HttpMethod } from "./drivers/default/enums/httpMethod";
22import { Model } from "./model" ;
33import { Orion } from "./orion" ;
44import { ExtractModelAttributesType } from "./types/extractModelAttributesType" ;
5- import { ExtractModelAllAttributesType } from "./types/extractModelAllAttributesType" ;
65import { ExtractModelRelationsType } from "./types/extractModelRelationsType" ;
76import { ModelConstructor } from "./contracts/modelConstructor" ;
87import { QueryBuilder } from "./drivers/default/builders/queryBuilder" ;
98import { ExtractModelPersistedAttributesType } from "./types/extractModelPersistedAttributesType" ;
10- import { ExtractModelKeyType } from "./types/extractModelKeyType" ;
119import { UrlBuilder } from "./builders/urlBuilder" ;
1210
1311type HydrateAttributes < M extends Model > = ExtractModelAttributesType < M > & ExtractModelPersistedAttributesType < M > & ExtractModelRelationsType < M > ;
@@ -78,7 +76,7 @@ export class Batch
7876 const data = {
7977 resources : { }
8078 } ;
81- items . forEach ( ( v , i ) => data . resources [ v . $getKey ( ) ] = v . $attributes ) ;
79+ items . forEach ( ( v ) => data . resources [ v . $getKey ( ) ] = v . $attributes ) ;
8280
8381 const response = await client . request < { data : Array < AllAttributes & Relations > } > (
8482 `${ url } /batch` ,
@@ -177,7 +175,7 @@ export class Batch
177175 let foundUrl : string | undefined = undefined ;
178176 let isModel = false ;
179177
180- let ids = items . map ( ( x : number | M ) => {
178+ const ids = items . map ( ( x : number | M ) => {
181179 // also find the url while we're at it
182180 if ( typeof ( x ) == 'object' && x . $resource ( ) && foundUrl == undefined ) {
183181 foundUrl = x . $resource ( ) ;
0 commit comments