https://github.com/ronin-co/codegen
Generates TypeScript types based on RONIN models.
https://github.com/ronin-co/codegen
codegen ronin ts typescript
Last synced: 25 days ago
JSON representation
Generates TypeScript types based on RONIN models.
- Host: GitHub
- URL: https://github.com/ronin-co/codegen
- Owner: ronin-co
- License: apache-2.0
- Created: 2025-03-11T16:57:26.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-04-02T13:32:26.000Z (about 1 month ago)
- Last Synced: 2025-04-02T14:31:19.919Z (about 1 month ago)
- Topics: codegen, ronin, ts, typescript
- Language: TypeScript
- Homepage: https://npmjs.com/package/@ronin/codegen
- Size: 85.9 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RONIN Codegen
[](https://github.com/ronin-co/codegen/actions/workflows/validate.yml)
[](https://codecov.io/github/ronin-co/codegen)
[](https://packagephobia.com/result?p=@ronin/codegen)This package generates TypeScript code based on RONIN models.
## Usage
```typescript
import { generate } from '@ronin/codegen';
import { model, string } from 'ronin/schema';const User = model({
slug: 'user',
pluralSlug: 'users',
fields: {
name: string(),
email: string({ required: true }),
},
});const generateCode = generate([User]);
// ^? string
```## Testing
Use the following command to run the test suite:
```
bun test
```