Skip to content

在支持class的环境下,使用oo继承一个class后无法创建实例 #40

Description

@otakustay

大概这样的代码:

class Foo {
}

let Bar = require('eoo').create(Foo);

new Bar();

如果不做任何编译,直接在支持class的环境下跑,会有这样的错:

TypeError: Class constructor Foo cannot be invoked without 'new'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions