Skip to content

Array<A|B> should be compatible with Array<A> #3425

Closed
@aldendaniels

Description

@aldendaniels

This:

declare function func(things: Array<string | number>): void;
declare var value: string[];
func(value);

Gives:

1: declare function func(things: Array<string | number>): void;
                                                ^ number. This type is incompatible with
2: declare var value: string[];
                      ^ string

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