Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler throws when using namespace import on engine #56

Closed
pmdartus opened this issue Feb 2, 2018 · 1 comment
Closed

Compiler throws when using namespace import on engine #56

pmdartus opened this issue Feb 2, 2018 · 1 comment
Labels

Comments

@pmdartus
Copy link
Member

pmdartus commented Feb 2, 2018

Description

When transforming a namespace import on engine the compiler throws. For example:

import * as engine from 'engine';
export default class Test extends engine.Element {}

Error:

Cannot read property 'name' of undefined.

While we need to fix the uncaught exception, this bug opened another discussion concerning if we should or not allow namespace import on engine. While the following code is valid javascript, it will be hard for the compiler to transform the decorator.

import * as engine from 'engine';
export default class Test extends engine.Element {
      @engine.api props;
}

It appears that we want to block namespaced import for now. We can still relax it in the future if requested.

@pmdartus pmdartus added the bug label Feb 2, 2018
@caridy
Copy link
Contributor

caridy commented Feb 2, 2018

I'm fine with this for now since we eventually will remove engine, and use a more formal name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants