Skip to content

functional/no-mixed-types fails when a function type is aliased using typeof #734

Closed
@apolishch

Description

@apolishch

Bug Report

no-mixed-types fails when a function type is aliased as part of a larger object type

Expected behavior

aliases are understood correctly

Actual behavior

functional/no-mixed-types fails with:

error Only the same kind of members allowed in types

Steps to reproduce

const func = (v: any): any => null
type foo = typeof func

type foobar = Readonly<{
    foo1: (v: any) => null,
    foo2: foo
}>

Proposed changes

I've had to turn off the rule for the time being unfortunately :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: ReleasedIt's now live.Type: BugInconsistencies or issues which will cause a problem for users or implementors.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions