-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Realm Babel
Problem
I am using @realm/babel-plugin@0.1.1, it seems currently only support simple types, but not:
- dictionary with typescript interface
- typescript enum
- typescript union type
- embed model
- linking objects
Is there a plan to support them or I missed something to know?
Currrently I need to use the old way of defining schema property to make my models work.
A little example:
Unable to find source-code formatter for language: typescript. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
export class NoteModel extends Realm.Object<NoteModel> { // @ts-ignore static name = "Note"; static primaryKey = "_id"; _id: Realm.Types.ObjectId = new Realm.BSON.ObjectId(); createdAt: Realm.Types.Date = new Date(); title!: string; // not work meta!: Realm.Types.Dictionary< { type: string; count: number; }> // not work status!: MyEmbedModel } export class MyEmbedModel extends Realm.Object<MyEmbedModel> { // @ts-ignore static name = "Status"; static embedded = true; enabled!: boolean; }
Solution
No response
How important is this improvement for you?
Would be a major improvement