productboardlabs / tslint-pb

📄 (DEPRECATED) Our own custom TSlint rules. What has been seen, cannot be unseen.
MIT License
5 stars 0 forks source link

Fix lint rule for `noMemo` selector with default values #69

Closed MartinNuc closed 4 years ago

MartinNuc commented 4 years ago

noMemo is supposed to allow default values. Covered in tests:

select.noMemo(
  [Store],
  (a: number = 10) => false,
);

But typical usage is with inferred type:

select.noMemo(
  [Store],
  (a = 10) => false,
);

which was not allowed. This PR allows inferred type for default parameter in the selector.

Aldredcz commented 4 years ago

Awesome, thanks! :)

Could you please also add analogical test for the 2 other types:

MartinNuc commented 4 years ago

@Aldredcz ✅ added tests for other selectors