Skip to content

Issue after upgrading to 0.7.2 from 0.7.0 #193

@jochenjonc

Description

@jochenjonc

Hi,

The change in #185 gives another kind of false positive, which I think worked before.

When you have a function with multiple signatures, like this:

export interface Hook {
  onInit?: (field: Field) => void | ((field: Field) => Observable<any>);
}

It doesn't seem to be able to distinguish between the one that returns void and the one that returns the Observable.

When I reorder it, like this:

export interface Hook {
  onInit?: ((field: Field) => Observable<any>) | (field: Field) => void;
}

It does work (I don't have a linting error).

But the sample I give is not part of code that I have under control, it comes from the Formly library. See https://github.com/ngx-formly/ngx-formly/blob/main/src/core/src/lib/models/fieldconfig.ts#L249-L257

Would it be possible to handle such cases in eslint-plugin-rxjs-x?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions