Vai al contenuto principale
When you work with Base44 in a TypeScript project, you can use dynamic types. Your entities, functions, agents, and connectors have corresponding TypeScript types that provide:
  • Autocomplete: Your IDE suggests available entities, fields, functions, agents, and connector integration types.
  • Type safety: Catch typos and invalid fields at compile time instead of runtime.
  • Documentation: Hover over types in your IDE to see field descriptions and types.

How it works

Base44 reads your backend configuration and creates a base44/.types/types.d.ts file that augments the SDK with types from your project. The types file includes:
  • Entity schemas with typed fields and CRUD operations
  • Function names for autocomplete
  • Agent names for autocomplete
  • Connector integration type names for autocomplete

Entity types

Dynamic types provide full type safety for all entity operations. Your entity fields, return types, and parameters are all strongly typed.

Function types

Function names are typed for autocomplete when invoking functions:
Function parameter types are not generated. Refer to your function implementation for expected parameters.

Agent types

Agent names are typed for autocomplete when working with conversations:

Connector types

Connector integration type names are typed for autocomplete when retrieving connections:
The connectors module is only available in service role mode (backend environments).

Generate types

To generate or update your types file, run the types generate command:
Re-run types generate whenever you modify entities, add functions, or change agents to keep types up to date.

See also

  • types generate: CLI command to generate types from your project
  • entities: SDK reference for working with entities
  • functions: SDK reference for invoking backend functions
  • agents: SDK reference for working with AI agents
  • connectors: SDK reference for managing OAuth tokens