Skip to content

TypeScript mapped type support #361

Closed
@ahutchings

Description

@ahutchings

Docgen is outputting parsing TypeScript mapped types as {name: 'unknown'} . I've started putting together a change to add support for mapped types, but I'm not sure how we want to represent the type descriptor for it, since it's not a feature that Flow has. Does anyone have thoughts on how the type descriptor should be structured for something like this?

var x: MyMappedType = {top: true};

type Side = 'top' | 'right' | 'bottom' | 'left';
type MyMappedType = { [side in Side]?: boolean};

cc @devongovett

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions