* Returns the items (the collection must be initialized)
(check = true)
| 216 | * Returns the items (the collection must be initialized) |
| 217 | */ |
| 218 | getItems(check = true): T[] { |
| 219 | if (check) { |
| 220 | this.checkInitialized(); |
| 221 | } |
| 222 | |
| 223 | return [...this.#items]; |
| 224 | } |
| 225 | |
| 226 | /** Serializes the collection items to plain JSON objects. Returns an empty array if not initialized. */ |
| 227 | toJSON<TT extends T>(): EntityDTO<TT>[] { |
no test coverage detected