Skip to content

Commit

Permalink
Internal Set Array must be Readonly
Browse files Browse the repository at this point in the history
Signed-off-by: guido <[email protected]>
  • Loading branch information
widoz committed Jan 27, 2024
1 parent 93bdffc commit dbad408
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sources/client/src/api/search-entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export async function searchEntities<E>(
});

// TODO What happen in the case of an error?
const entities = await fetch<Array<E>>({
const entities = await fetch<ReadonlyArray<E>>({
path: `?rest_route=/wp/v2/search&${params.toString()}`,
});

Expand Down
2 changes: 1 addition & 1 deletion sources/client/src/vo/set.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export class Set<T> {
readonly #data: ReadonlyArray<T>;

public constructor(data: Array<T> = []) {
public constructor(data: ReadonlyArray<T> = []) {
this.#data = data;
}

Expand Down

0 comments on commit dbad408

Please sign in to comment.