Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

Add a possibility to use aliases in mapFields and mapMethods #10

Merged
merged 2 commits into from
Oct 21, 2017
Merged

Add a possibility to use aliases in mapFields and mapMethods #10

merged 2 commits into from
Oct 21, 2017

Conversation

lacedon
Copy link

@lacedon lacedon commented Oct 17, 2017

No description provided.

src/helpers.ts Outdated
export type PropList = string[] | { [propAlias: string]: string }

function mapProps(store: object, propNames: PropList, mapProp: (store: object, propName: string) => Function): object {
const isArray = propNames instanceof Array;
Copy link
Owner

Choose a reason for hiding this comment

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

Maybe Array.isArray(propNames) is better.

@nighca
Copy link
Owner

nighca commented Oct 19, 2017

@lacedon Thx for your excellent PR! There's one little problem in the code.

@lacedon
Copy link
Author

lacedon commented Oct 21, 2017

@nighca, fixed that.
Also, removed extra semicolons.

Copy link
Owner

@nighca nighca left a comment

Choose a reason for hiding this comment

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

👍

@nighca nighca merged commit c7f0b2b into nighca:master Oct 21, 2017
@nighca
Copy link
Owner

nighca commented Oct 21, 2017

v0.0.5

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

Successfully merging this pull request may close these issues.

2 participants