Skip to content

Commit 1ad9bd3

Browse files
committed
Update getFilterableAttributes return type
1 parent 30be965 commit 1ad9bd3

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/indexes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -782,8 +782,8 @@ export class Index<T extends RecordAny = RecordAny> {
782782
*
783783
* @returns Promise containing an array of filterable-attributes
784784
*/
785-
async getFilterableAttributes(): Promise<string[]> {
786-
return await this.httpRequest.get<string[]>({
785+
async getFilterableAttributes(): Promise<FilterableAttributes> {
786+
return await this.httpRequest.get<FilterableAttributes>({
787787
path: `indexes/${this.uid}/settings/filterable-attributes`,
788788
});
789789
}

tests/filterable_attributes.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ describe.each([{ permission: "Master" }, { permission: "Admin" }])(
6969
.updateFilterableAttributes(newFilterableAttributes)
7070
.waitTask();
7171

72-
const response: string[] = await client
73-
.index(index.uid)
74-
.getFilterableAttributes();
72+
const response = await client.index(index.uid).getFilterableAttributes();
7573
expect(response).toEqual(newFilterableAttributes);
7674
});
7775

0 commit comments

Comments
 (0)