Skip to content

Unexpected keyword 'const' #8

@max107

Description

@max107

How to reproduce

skpm create test
cd test
echo "export default function(context) { fetch('https://google.com'); }" > src/my-command.js
npm run start

Error trace:

SyntaxError: Unexpected keyword 'const'. Const declarations are not supported in strict mode..
Plugin “my-command”, line 274:
» const SuperInit = (0, _runtime.SuperCall)(NSStringFromSelector("init"), [], { type: "@" });

Compiled code

// super when returnType is id and args are void
// id objc_msgSendSuper(struct objc_super *super, SEL op, void)

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

// Returns a real ObjC class. No need to use new.

Info:

Mac 10.11.6
xcode 7.3.1
npm 5.3.0
skpm 1.0.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions