Skip to content

Commit 6b89bde

Browse files
refactor(types): replace Record with mapped types
1 parent ea81361 commit 6b89bde

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/resources/shared.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
export interface ErrorMessage {
44
description: string;
55

6-
extras: Record<string, unknown>;
6+
extras: { [key: string]: unknown };
77

88
key: string;
99
}
1010

1111
export interface ErrorObject {
1212
errors: Array<ErrorMessage>;
1313

14-
extras: Record<string, unknown>;
14+
extras: { [key: string]: unknown };
1515

1616
tpe: string;
1717
}
@@ -39,7 +39,7 @@ export interface FunctionDefinition {
3939
/**
4040
* The parameters of the function.
4141
*/
42-
export type FunctionParams = Record<string, unknown>;
42+
export type FunctionParams = { [key: string]: unknown };
4343

4444
export interface GraphData {
4545
sources?: Array<Source | null>;
@@ -144,7 +144,7 @@ export namespace ToolCallStreaming {
144144
}
145145

146146
export interface ToolChoiceJsonObject {
147-
value: Record<string, unknown>;
147+
value: { [key: string]: unknown };
148148
}
149149

150150
export interface ToolChoiceString {

0 commit comments

Comments
 (0)