cocoascript-class icon indicating copy to clipboard operation
cocoascript-class copied to clipboard

transpile with babel-preset-airbnb

Open jem-computer opened this issue 8 years ago • 2 comments

@darknoon I think this module needs to be transpiled to work in some environments, possibly those with an old JSC environment.

I found the bug on my home Mac, and it was just reported here too: https://github.com/airbnb/react-sketchapp/issues/90

SyntaxError: Unexpected keyword 'const'. Const declarations are not supported in strict mode..
Plugin “react-sketchapp: Foursquare + Google Maps”, line 12175:
» const SuperInit = (0, _runtime.SuperCall)(NSStringFromSelector("init"), [], { type: "@" });

With this change, it gets transpiled to

var SuperInit = (0, _runtime.SuperCall)(NSStringFromSelector("init"), [], { type: "@" });

Thoughts?

jem-computer avatar May 09 '17 01:05 jem-computer

@jongold I don't see a solution to the arguments issue with transpilation here, so how will it not break?

darknoon avatar May 17 '17 17:05 darknoon

for #2

darknoon avatar Aug 08 '17 18:08 darknoon