Skip to content
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

@bem-react/core Proposal withBemMod with type check for mod #458

Open
belozer opened this issue Aug 3, 2019 · 0 comments · May be fixed by #463
Open

@bem-react/core Proposal withBemMod with type check for mod #458

belozer opened this issue Aug 3, 2019 · 0 comments · May be fixed by #463

Comments

@belozer
Copy link
Member

belozer commented Aug 3, 2019

export interface IconFaInstagramProps {
    fa?: 'instagram'
}

export const withFaInstagram = withBemMod<IconFaInstagramProps>(cnIcon(), {
    fa: 'Instagram' // -> TS not work
}, Icon => props => (<Icon {...props}><FaInstagram /></Icon>));

На текущий момент нет как типизации так и подсказок при наборе.
Приходится тратить на это время и внимание (хоть мы и прокинули интерфейс уже...).

@belozer belozer changed the title @bem-react/core Proposal: withBemMod use type check for mod @bem-react/core Proposal withBemMod with type check for mod Aug 3, 2019
@belozer belozer linked a pull request Aug 9, 2019 that will close this issue
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 a pull request may close this issue.

1 participant