Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-2089

Babel Plugin does not add schema if implements is on a different line in the code

      How frequently does the bug occur?

      Always

      Description

      The Babel plugin does not add a static schema to my TypeScript file when an implements statement is on a different line than the extends statement.

      The following examples do NOT get a schema added by the Babel plugin:

      export class MyObject extends Realm.Object<MyObject>
        implements MyInterface // this is on a different line from extends
      ...
      
      export class MyObject 
        extends Realm.Object<MyObject> // on a different line from class
        implements MyInterface // this is on a different line from extends
      ...
      

      The following examples DO get a schema added by the Babel plugin - because the implements is on the same line as the extends:

      export class MyObject extends Realm.Object<MyObject> implements MyInterface // this is on a the SAME line as extends
      ...
      
      export class MyObject 
        extends Realm.Object<MyObject> implements MyInterface // extends is on a different line from class but implements is on the SAME line as extends
      ...
      
      

      Stacktrace & log output

      No response

      Can you reproduce the bug?

      Always

      Reproduction Steps

      No response

      Version

      Babel plugin 0.1.1

      What services are you using?

      Local Database only

      Are you using encryption?

      No

      Platform OS and version(s)

      Android 11 R API 30 - Pixel 5 emulator

      Build environment

      Which debugger for React Native: ..
      Flipper

      Cocoapods version

      No response

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: