Skip to content

ParamTypes issue #26

@sirian

Description

@sirian

As I mentioned in microsoft/TypeScript#25660 (comment) and in microsoft/TypeScript#21316 (comment)
without inversed check you got wrong result

declare function argTypes<F extends Function>(f: F): ParamTypes<F>

// $ExpectType []
argTypes(() => true); // Expected type to be:  [] got:  {}

// $ExpectType [string, boolean | undefined]
argTypes((x: string, y?: boolean) => true); // Expected type to be:  [string, boolean | undefined] got:  [string]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions