Problem Statement
Summary
Add a new base44 types command that generates TypeScript types from local entity schemas, enabling type-safe usage of the @base44/sdk.
Problem
Developers using Base44 define entities in JSON schema files, but lack TypeScript types for:
- Type-safe data access in frontend code
- IDE autocomplete when working with entities
- Compile-time validation of entity properties
Solution
The base44 types command reads local entity schemas and generates:
| File |
Contents |
entities.ts |
Entity interfaces + CreateInput/UpdateInput/Filter types |
client.ts |
Typed SDK client interface matching @base44/sdk API |
index.ts |
Barrel exports |
Usage
# Generate types (outputs to src/base44/)
base44 types
# Custom output directory
base44 types --output ./types
# Only generate entity types, skip client wrapper
base44 types --entities-only
### Proposed Solution
_No response_
### Alternatives Considered
_No response_
### Usage Examples
_No response_
### Additional Context
_No response_
Problem Statement
Summary
Add a new
base44 typescommand that generates TypeScript types from local entity schemas, enabling type-safe usage of the@base44/sdk.Problem
Developers using Base44 define entities in JSON schema files, but lack TypeScript types for:
Solution
The
base44 typescommand reads local entity schemas and generates:entities.tsclient.ts@base44/sdkAPIindex.tsUsage