realm-schema-to-typescript
v0.0.4
Published
![](https://github.com/odanado/realm-schema-to-typescript/workflows/Node%20CI/badge.svg)
Downloads
6
Readme
realm-schema-to-typescript
Generate a code of TypeScript from Realm
Installation and Usage
From CLI
$ npx realm-schema-to-typescript --input /path/to/file.realm --directory generated --moduleName module
From TypeScript
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);