Page MenuHomeSealhub

collection-response.ts
No OneTemporary

collection-response.ts

import SealiousResponse from "./sealious-response";
import Item from "./item";
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, 04:06 (17 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
556809
Default Alt Text
collection-response.ts (681 B)

Event Timeline