Skip to content

Allow string literal type alias in $PropertyType #2310

@samwgoldman

Description

@samwgoldman
/* @flow */
type Key = 'key';
type T = { key: number };
declare var prop: $PropertyType<T,Key>;

Actual output:

4: declare var prop: $PropertyType<T,Key>;
                     ^ expected object type and string literal as arguments to $PropertyType

Expected: No error

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