Skip to content

Commit 7dc89a1

Browse files
committed
Change as any to as Record<string, any> for a narrower condition
1 parent afb3153 commit 7dc89a1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/data/creator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ export default class Creator extends CommandBase {
6161
}
6262
};
6363

64-
// as any required below because server uses swagger object as interface{} in Go to perform type switching
64+
// as Record<string, any> required below because server uses swagger object as interface{} in Go to perform type switching
6565
// actual types are []number and [][]number but unions don't work in go-swagger
6666
payload = (): WeaviateObject => ({
6767
tenant: this.tenant,
6868
vector: this.vector,
6969
properties: this.properties,
7070
class: this.className,
7171
id: this.id,
72-
vectors: this.vectors as any,
72+
vectors: this.vectors as Record<string, any>,
7373
});
7474

7575
validate = () => {

src/data/updater.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ export default class Updater extends CommandBase {
6767
return this;
6868
};
6969

70-
// as any required below because server uses swagger object as interface{} in Go to perform type switching
70+
// as Record<string, any> required below because server uses swagger object as interface{} in Go to perform type switching
7171
// actual types are []number and [][]number but unions don't work in go-swagger
7272
payload = (): WeaviateObject => ({
7373
tenant: this.tenant,
7474
properties: this.properties,
7575
class: this.className,
7676
id: this.id,
7777
vector: this.vector,
78-
vectors: this.vectors as any,
78+
vectors: this.vectors as Record<string, any>,
7979
});
8080

8181
validate = () => {

0 commit comments

Comments
 (0)