eslint-plugin-functional icon indicating copy to clipboard operation
eslint-plugin-functional copied to clipboard

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

Open apolishch opened this issue 1 year ago • 0 comments

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 :(

apolishch avatar Sep 07 '23 12:09 apolishch