[PR #1903] [MERGED] fix(docs): resolve TypeScript type errors in LangGraph QuickStart tutorial #1958

Closed
opened 2026-02-17 17:22:54 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/docs/pull/1903
Author: @EstoesMoises
Created: 12/14/2025
Status: Merged
Merged: 12/19/2025
Merged by: @lnhsingh

Base: mainHead: fix/improve-typesafety-quickstart


📝 Commits (3)

  • 4122a86 fix(docs): resolve TypeScript type errors in LangGraph QuickStart tutorial
  • 509cca7 fix: reverting to previous Zod import
  • 58a7d8f Merge branch 'main' into fix/improve-typesafety-quickstart

📊 Changes

1 file changed (+67 additions, -41 deletions)

View changed files

📝 src/oss/langgraph/quickstart.mdx (+67 -41)

📄 Description

Overview

Fixed TypeScript type errors and deprecated API usage in the LangGraph quickstart tutorial.

Graph API (main changes):

  • Migrated state definition from Zod to Annotation API to resolve type incompatibilities
  • Replaced deprecated isAIMessage() with AIMessage.isInstance()
  • Replaced deprecated .getType() with .type property

Functional API:

  • Updated to use AIMessage.isInstance() and .type property for consistency
  • Removed unused import from "Step 4: Define agent"

These changes eliminate typecheck errors while keeping the example clear and easy to follow.

Type of change

Type: Update existing documentation

Related issues/PRs

It resolves - https://github.com/langchain-ai/langchainjs/issues/9778

Checklist

  • I have read the contributing guidelines
  • I have tested my changes locally using docs dev
  • All code examples have been tested and work correctly
  • I have used root relative paths for internal links
  • I have updated navigation in src/docs.json if needed

🔄 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/docs/pull/1903 **Author:** [@EstoesMoises](https://github.com/EstoesMoises) **Created:** 12/14/2025 **Status:** ✅ Merged **Merged:** 12/19/2025 **Merged by:** [@lnhsingh](https://github.com/lnhsingh) **Base:** `main` ← **Head:** `fix/improve-typesafety-quickstart` --- ### 📝 Commits (3) - [`4122a86`](https://github.com/langchain-ai/docs/commit/4122a86808d59f87c418358ad2016a4854fa64b0) fix(docs): resolve TypeScript type errors in LangGraph QuickStart tutorial - [`509cca7`](https://github.com/langchain-ai/docs/commit/509cca7b13caab40fba49b37cff84810ba01a7ae) fix: reverting to previous Zod import - [`58a7d8f`](https://github.com/langchain-ai/docs/commit/58a7d8fe9482adb7bda4a92f1ccaa4908b61833f) Merge branch 'main' into fix/improve-typesafety-quickstart ### 📊 Changes **1 file changed** (+67 additions, -41 deletions) <details> <summary>View changed files</summary> 📝 `src/oss/langgraph/quickstart.mdx` (+67 -41) </details> ### 📄 Description ## Overview Fixed TypeScript type errors and deprecated API usage in the LangGraph quickstart tutorial. **Graph API (main changes):** - Migrated state definition from Zod to Annotation API to resolve type incompatibilities - Replaced deprecated `isAIMessage()` with `AIMessage.isInstance()` - Replaced deprecated `.getType()` with `.type` property **Functional API:** - Updated to use `AIMessage.isInstance()` and `.type` property for consistency - Removed unused import from "Step 4: Define agent" These changes eliminate typecheck errors while keeping the example clear and easy to follow. ## Type of change **Type:** Update existing documentation ## Related issues/PRs It resolves - https://github.com/langchain-ai/langchainjs/issues/9778 ## Checklist <!-- Put an 'x' in all boxes that apply --> - [X] I have read the [contributing guidelines](README.md) - [X] I have tested my changes locally using `docs dev` - [X] All code examples have been tested and work correctly - [X] I have used **root relative** paths for internal links - [X] I have updated navigation in `src/docs.json` if needed --- <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-17 17:22:54 -05:00
yindo closed this issue 2026-02-17 17:22:54 -05:00
yindo changed title from [PR #1903] fix(docs): resolve TypeScript type errors in LangGraph QuickStart tutorial to [PR #1903] [MERGED] fix(docs): resolve TypeScript type errors in LangGraph QuickStart tutorial 2026-06-05 18:15:52 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#1958