Skip to content

ES2015 example "Cannot call a class as a function" #12

@kingjerod

Description

@kingjerod

When running the ES2015 example, it doesn't look like class constructors can be used, which is a real disappointment, I don't want to write a factory function for every class.

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

TypeError: Cannot call a class as a function

As an aside, all of your examples include the container file with a relative directory. I think they would be more useful if they used the library as a normal user would:

var container = require('kontainer-di');

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