Skip to content

Less generic type checks #70

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 3, 2020
Merged

Less generic type checks #70

merged 1 commit into from
Oct 3, 2020

Conversation

tomhooijenga
Copy link
Contributor

This PR relates to #68.

Performance should increase 15 to 20%.

this improves performance ~15%
@tomhooijenga tomhooijenga requested a review from Skn0tt as a code owner October 2, 2020 15:02

export const isSet = (payload: any): payload is Set<any> =>
getType(payload) === 'Set';
payload instanceof Set;

export const isSymbol = (payload: any): payload is symbol =>
getType(payload) === 'Symbol';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The linter would not let me replace this with typeof payload === 'symbol'

@Skn0tt
Copy link
Collaborator

Skn0tt commented Oct 3, 2020

Awesome! Thanks for this great PR.

@Skn0tt Skn0tt merged commit 7cfd031 into flightcontrolhq:main Oct 3, 2020
@Skn0tt
Copy link
Collaborator

Skn0tt commented Oct 3, 2020

@allcontributors add tomhooijenga code

@allcontributors
Copy link
Contributor

@Skn0tt

I've put up a pull request to add @tomhooijenga! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants