https://github.com/odanado/realm-schema-to-typescript
Generate a code of TypeScript from Realm
https://github.com/odanado/realm-schema-to-typescript
codegenerator realm typescript
Last synced: 2 months ago
JSON representation
Generate a code of TypeScript from Realm
- Host: GitHub
- URL: https://github.com/odanado/realm-schema-to-typescript
- Owner: odanado
- Created: 2019-09-18T04:29:42.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T03:20:03.000Z (almost 3 years ago)
- Last Synced: 2025-07-10T08:33:43.606Z (3 months ago)
- Topics: codegenerator, realm, typescript
- Language: TypeScript
- Homepage:
- Size: 179 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# realm-schema-to-typescript
Generate a code of TypeScript from [Realm](https://realm.io/)
## Installation and Usage
### From CLI
```bash
$ npx realm-schema-to-typescript --input /path/to/file.realm --directory generated --moduleName module
```### From TypeScript
```ts
import { SchemaReader, Transpiler } from 'realm-schema-to-typescript';const schemaReader = new SchemaReader();
const transpiler = new Transpiler();const schema = await schemaReader.read('/path/to/file.realm');
const code = transpiler.transpile(schema, { moduleName: 'module' });console.log(code);
```