Page MenuHomeSealhub

collection-response.ts
No OneTemporary

collection-response.ts

import SealiousResponse from "./sealious-response.js";
import Item from "./item.js";
export default class CollectionResponse extends SealiousResponse {
items: Item[];
constructor({
items,
attachments = {},
fieldsWithAttachments = {},
}: {
items: Item[];
attachments: { [id: string]: Item };
fieldsWithAttachments: { [field_name: string]: {} };
}) {
super({ items, attachments, fieldsWithAttachments });
this.items = items;
}
toObject() {
return {
items: this.items,
attachments: this._attachments,
fieldsWithAttachments: this._fieldsWithAttachments,
};
}
get length() {
return this.items.length;
}
get empty() {
return this.length === 0;
}
}

File Metadata

Mime Type
text/x-java
Expires
Mon, Dec 23, 00:59 (9 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
556790
Default Alt Text
collection-response.ts (687 B)

Event Timeline