Skip to content

Commit 1f77f3e

Browse files
committed
Fixed linter errors
1 parent 418e277 commit 1f77f3e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/batch.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ import { HttpMethod } from "./drivers/default/enums/httpMethod";
22
import { Model } from "./model";
33
import { Orion } from "./orion";
44
import { ExtractModelAttributesType } from "./types/extractModelAttributesType";
5-
import { ExtractModelAllAttributesType } from "./types/extractModelAllAttributesType";
65
import { ExtractModelRelationsType } from "./types/extractModelRelationsType";
76
import { ModelConstructor } from "./contracts/modelConstructor";
87
import { QueryBuilder } from "./drivers/default/builders/queryBuilder";
98
import { ExtractModelPersistedAttributesType } from "./types/extractModelPersistedAttributesType";
10-
import { ExtractModelKeyType } from "./types/extractModelKeyType";
119
import { UrlBuilder } from "./builders/urlBuilder";
1210

1311
type 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

Comments
 (0)