Base44: TypeScript Type Generation
Base44 introduced a types generate CLI command that automatically produces a TypeScript declaration file from a project's backend resources β entities, functions, agents, and connectors. The generated types.d.ts file augments the @base44/sdk module with project-specific interfaces, enabling autocomplete and compile-time type checking in any TypeScript-aware editor.
Sources & Mentions
2 external resources covering this update
Overview
Base44 added TypeScript type generation to its CLI, allowing developers to automatically produce typed interfaces from their backend resource definitions. A single command reads the project's entities, functions, agents, and connectors and outputs a types.d.ts declaration file that makes the @base44/sdk fully type-aware for that specific project.
How It Works
Developers run the command from their project directory with base44 types generate. The CLI reads the project's local resource definitions and generates a TypeScript declaration file at base44/.types/types.d.ts. If a tsconfig.json is present, the command automatically updates it to include the generated types.
What Gets Generated
Entity Interfaces
For each entity defined in the project, the command generates a full TypeScript interface derived from the entity's JSON schema. Required and optional fields are correctly typed, and nested objects produce their own sub-interfaces. An EntityTypeRegistry maps entity names to their corresponding interfaces, enabling type-safe queries throughout the codebase.
Name Registries
For functions, agents, and connectors, the command generates name registry types β FunctionNameRegistry, AgentNameRegistry, and ConnectorTypeRegistry β which provide autocomplete for resource names when calling SDK methods.
Developer Experience Impact
Autocomplete for Resource Names
Without generated types, calling a Base44 entity or function requires knowing the exact string name from memory or documentation. With the generated registry types, editors surface valid resource names as autocomplete suggestions, catching typos before they become runtime errors.
Compile-Time Safety for Data Access
Entity interfaces mean that reading or writing to a Base44 entity is now validated at compile time. Accessing a field that doesn't exist on an entity produces a TypeScript error immediately in the editor, rather than a silent failure at runtime.
Context
TypeScript type generation is a common pattern in modern backend-as-a-service tooling β Supabase, Prisma, and tRPC all offer similar capabilities. Base44 bringing this to its CLI signals a maturation of its developer toolchain beyond pure AI-assisted vibe coding toward professional-grade software development workflows.