Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Fix lint rule for noMemo selector with default values #69

Merged
merged 2 commits into from
Jun 4, 2020

Conversation

MartinNuc
Copy link
Contributor

@MartinNuc MartinNuc commented Jun 3, 2020

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.

@MartinNuc MartinNuc force-pushed the fix/selector-default-values branch from ef1d6ca to 6dc4eae Compare June 3, 2020 15:52
@MartinNuc MartinNuc requested review from Aldredcz, Hotell and jukben June 3, 2020 15:52
Copy link
Contributor

@jukben jukben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense to me, I would wait for @Aldredcz since he wrote that one. Then let’s merge it and I will release it ASAP so you can bump it. 🙌

@Aldredcz
Copy link
Contributor

Aldredcz commented Jun 4, 2020

Awesome, thanks! :)

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

@MartinNuc MartinNuc force-pushed the fix/selector-default-values branch from 6dc4eae to ee77e22 Compare June 4, 2020 09:27
@MartinNuc
Copy link
Contributor Author

@Aldredcz ✅ added tests for other selectors

Copy link
Contributor

@Aldredcz Aldredcz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀🚀🚀

@MartinNuc MartinNuc merged commit 96f75f5 into master Jun 4, 2020
@Aldredcz Aldredcz deleted the fix/selector-default-values branch June 11, 2020 12:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants