mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
14 lines
432 B
TypeScript
14 lines
432 B
TypeScript
import { BaseResponse } from "./base.response";
|
|
|
|
export class ListResponse<T> extends BaseResponse {
|
|
data: T[];
|
|
continuationToken: string;
|
|
|
|
constructor(response: any, t: new (dataResponse: any) => T) {
|
|
super(response);
|
|
const data = this.getResponseProperty("Data");
|
|
this.data = data == null ? [] : data.map((dr: any) => new t(dr));
|
|
this.continuationToken = this.getResponseProperty("ContinuationToken");
|
|
}
|
|
}
|