realm-js
                                
                                 realm-js copied to clipboard
                                
                                    realm-js copied to clipboard
                            
                            
                            
                        Decorator support
Hello,
I've written a library the provides basic babel decorator-legacy support to ES6 classes and was wondering if this is something best suited for userland or if you'd consider a PR?
https://npm.im/realm-util
Current syntax:
const ru = require('realm-util');
 
@realmSchema({
  properties: {
    name: { type: 'string' },
    age: { type: 'int' }
  }
})
class Artist {
  hello() {
    console.log('hi');
  }
}
 
console.log(Artist.schema);
/*
  {
    name: 'Artist',
    properties: {
      name: { type: 'string' },
      age: { type: 'int' }
    }
  }
 */
Hi, thanks for reaching out @jimthedev. Someone will review what you've provided/shared and follow-up with some thoughts or questions. Cheers!
@istx25 Great. Thanks!
@jimthedev this is great, thanks for reaching out! I think it's a bit premature for us to start relying on decorators because we need to support a multitude of environments, but maybe we'll look into it at some point in the future.