forked from cartant/eslint-plugin-rxjs
-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
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
Labels
bugSomething isn't workingSomething isn't working