fix(sdk-js): use type instead of interface to avoid TS errors

Allow assigning `threadState?.checkpoint` to the `configurable` object without TSC throwing "Index signature for type 'string' is missing in type".
This commit is contained in:
Tat Dat Duong
2025-02-08 10:32:28 -08:00
parent 16cfeff78c
commit 2064ea4793
2 changed files with 9 additions and 8 deletions
+1 -1
View File
@@ -649,7 +649,7 @@ export class ThreadsClient extends BaseClient {
let threadId: string;
if (typeof threadIdOrConfig !== "string") {
if (typeof threadIdOrConfig.configurable.thread_id !== "string") {
if (typeof threadIdOrConfig.configurable?.thread_id !== "string") {
throw new Error(
"Thread ID is required when updating state with a config.",
);