[PR #289] [MERGED] Define StateGraph State in a single delcaration, from which both reducers and state and update interfaces are inferred #634

Closed
opened 2026-02-15 19:15:17 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraphjs/pull/289
Author: @nfcampos
Created: 7/31/2024
Status: Merged
Merged: 8/2/2024
Merged by: @jacoblee93

Base: mainHead: nc/31jul/state-def


📝 Commits (3)

  • a2339db Define StateGraph State in a single delcaration, from which both reducers and state and update interfaces are inferred
  • a85288f Use type guard instead of instanceof
  • 523d6b4 Fix build by bumping core dep

📊 Changes

7 files changed (+149 additions, -41 deletions)

View changed files

📝 langgraph/package.json (+1 -1)
📝 langgraph/src/channels/base.ts (+4 -0)
📝 langgraph/src/graph/message.ts (+5 -1)
📝 langgraph/src/graph/state.ts (+97 -28)
📝 langgraph/src/tests/graph.test.ts (+27 -4)
📝 package.json (+2 -1)
📝 yarn.lock (+13 -6)

📄 Description

This more closely matches python, where a single declaration gives you all three

Fixes # (issue)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/langgraphjs/pull/289 **Author:** [@nfcampos](https://github.com/nfcampos) **Created:** 7/31/2024 **Status:** ✅ Merged **Merged:** 8/2/2024 **Merged by:** [@jacoblee93](https://github.com/jacoblee93) **Base:** `main` ← **Head:** `nc/31jul/state-def` --- ### 📝 Commits (3) - [`a2339db`](https://github.com/langchain-ai/langgraphjs/commit/a2339dbd4899c5fd11ea2efd385c8e1368e7cdcb) Define StateGraph State in a single delcaration, from which both reducers and state and update interfaces are inferred - [`a85288f`](https://github.com/langchain-ai/langgraphjs/commit/a85288f95ce59b12c061e5f34682abe3548b865f) Use type guard instead of instanceof - [`523d6b4`](https://github.com/langchain-ai/langgraphjs/commit/523d6b415f2c92e811aec0cb9de9312434669fab) Fix build by bumping core dep ### 📊 Changes **7 files changed** (+149 additions, -41 deletions) <details> <summary>View changed files</summary> 📝 `langgraph/package.json` (+1 -1) 📝 `langgraph/src/channels/base.ts` (+4 -0) 📝 `langgraph/src/graph/message.ts` (+5 -1) 📝 `langgraph/src/graph/state.ts` (+97 -28) 📝 `langgraph/src/tests/graph.test.ts` (+27 -4) 📝 `package.json` (+2 -1) 📝 `yarn.lock` (+13 -6) </details> ### 📄 Description This more closely matches python, where a single declaration gives you all three <!-- Thank you for contributing to LangGraph.js! Your PR will appear in our next release under the title you set above. Please make sure it highlights your valuable contribution. To help streamline the review process, please make sure you read our contribution guidelines: https://github.com/langchain-ai/langgraphjs/blob/main/CONTRIBUTING.md Replace this block with a description of the change, the issue it fixes (if applicable), and relevant context. Finally, we'd love to show appreciation for your contribution - if you'd like us to shout you out on Twitter, please also include your handle below! --> <!-- Remove if not applicable --> Fixes # (issue) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 19:15:17 -05:00
yindo closed this issue 2026-02-15 19:15:18 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#634