Skip to content

no-explicit-generics doesn't work correctlyΒ #77

@mark-akturatech

Description

@mark-akturatech

version: 0.6.0

Gday,
First - great job. Thank you.

Not sure if worth removing no-explicit-generics from strict rule set.

The rule is generating an error for lines of code like this...

private readonly itemSelectionUpdateSubject$ = new BehaviorSubject<ItemSelectionModel | undefined>(undefined);

If i follow the rule and remove the generic then when the subject is set it will error as the subject has type 'undefined'.

Maybe an option to ignore undefined could work here or probably would be better if the rule ignored generics with union types (or had an option to enable that behavior).

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