You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Record classes are not correctly recognized as classes. typeof, extending and nominal typing doesn't work correctly and no constructor is found.
How to reproduce
/* @flow */import{Record}from'immutable';constClass=Record({a: 'asd',b: 123});constval=newClass();// NOPE, no constructor found in RecordClassclassAnotherClassextendsClass{// NOPE cannot extend}
In general, using new is discouraged for records - those are factory functions. Merged that fix PR, but know that the flow types are less correct in that case
What happened
Record classes are not correctly recognized as classes.
typeof
, extending and nominal typing doesn't work correctly and no constructor is found.How to reproduce
Fixed in #1193
The text was updated successfully, but these errors were encountered: