Skip to content

Map types changed from 0.9.0 to 0.11.0 to become exact width matches #121

@ajbogh

Description

@ajbogh

It seems as though there's a breaking change in thrift2flow 0.11.0 where maps become exact width maps in the js files:

3: optional map<string,string> myStringMap

Used to be this in 0.9.0

myStringMap?: ?{ [string]: string }

Is now this in 0.11.0

myStringMap?: ?{| [string]: string |}

This is a breaking change if flowtype was checking the types of assigned objects before. Afterward it produces this error:

Cannot assign Object.freeze(...) to pizza because property minSpend is missing in object type [1] but exists in object
literal [2] in property someVariable.myStringMap.

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