mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-29 21:15:11 +02:00
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:
@@ -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.",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user