Skip to content

Should interface reject static interface members? #803

Closed
@popham

Description

@popham

I just tried to use a static member function within an interface, and I got an unexpected identifier error:

/* @flow */

interface A {
  static someStatic(): void;
} // inter.js:4:10,10: Unexpected identifier

Is relaxing Type._object env to Type._object ~allow_static:true env (src/parser/parser_flow.ml) fraught with peril? (I expect the override semantics of class to get applied, so I don't see any problem.)

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