0.0.4 • Published 6 years ago
realm-schema-to-typescript v0.0.4
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);