fix: begin writing Lists integration tests. fix: list item response model's id value should be of type string so modified the created with id response model that it extends so that the id property is generically typed and type can be passed in.

This commit is contained in:
Stevan Freeborn
2023-02-17 14:27:33 -06:00
parent 369540d3c8
commit bc8b9a4977
10 changed files with 148 additions and 32 deletions
+5 -5
View File
@@ -1,15 +1,15 @@
export class CreatedWithIdResponse {
export class CreatedWithIdResponse<T> {
/**
* @property {number} id - The id of the created object.
* @property {T} id - The id of the created object.
*/
public id: number;
public id: T;
/**
* @constructor - Creates a new instance of the CreatedWithIdResponse class.
* @param id - The id of the created object.
* @returns {CreatedWithIdResponse} - A new instance of the CreatedWithIdResponse class.
* @returns {CreatedWithIdResponse<T>} - A new instance of the CreatedWithIdResponse class.
*/
constructor(id: number) {
constructor(id: T) {
this.id = id;
}
}