---
schema: 1
type: term
title: '**Type checker**'
description: >-
  A **type checker** is a tool that validates code against a library's static
  types in real time, catching errors such as calls to methods that don't exist
  and pointing to the correct alternatives with relevant documentation. In this
  material, it is the safety net that lets an AI agent execute code against an
  API's SDK without hallucinating methods.
canonical: 'https://liquidgold.cc/channel/everyinc/explore/term/type-checker-66623dc0270e'
markdown: >-
  https://liquidgold.cc/channel/everyinc/explore/term/type-checker-66623dc0270e.md
llms: null
parent: 'https://liquidgold.cc/channel/everyinc/llms.txt'
channel: everyinc
updated: '2026-10-23T22:12:35.346Z'
language: null
children: []
---


# \*\*Type checker\*\*

Canonical: https://liquidgold.cc/channel/everyinc/explore/term/type-checker-66623dc0270e

Parent: [Channel index](https://liquidgold.cc/channel/everyinc/llms.txt)

## Definition

A **type checker** is a tool that validates code against a library's static types in real time, catching errors such as calls to methods that don't exist and pointing to the correct alternatives with relevant documentation. In this material, it is the safety net that lets an AI agent execute code against an API's SDK without hallucinating methods.

## How the type checker is used in this material In the interview with **Alex Rattray of Stainless**, the type checker appears as the safety net that makes **code execution** viable for agents. Instead of exposing hundreds of API endpoints as MCP tools, the model gets two tools — one to run **TypeScript** against the API's SDK, one to search the docs. That pattern only works if the library behaves perfectly out of the box: right version, no hallucinated methods.  ### The hallucination guard The type checker catches errors in real time. When a model writes a call that doesn't exist, it gets an immediate, specific correction plus inline documentation: > `stripe.transactions.list` doesn't exist — did you mean payment intents, orders, or balance transactions? The inline documentation is returned by a sub-agent that is not burdened with the full conversation context.    ### Why it matters Without this check, an agent executing code against an SDK could fail silently or repeatedly on fabricated method names, eroding the token and latency advantages that make code execution attractive. The type checker is what turns static typing into the hallucination guard for the code-execution future.   - A type checker validates the code an agent writes against the API's SDK in real time. - It catches hallucinated method calls like a nonexistent `stripe.transactions.list` and suggests correct alternatives. - It returns relevant documentation inline, powered by a sub-agent unburdened by full conversation context. - It is the safety net that makes the code-execution pattern — two tools instead of hundreds — workable.  [^ea9761fa@2142] [^ea9761fa@2398] [^ea9761fa@2412]
