Skip to content
This repository was archived by the owner on Feb 4, 2018. It is now read-only.

Strict arguments #109

Open
2 tasks
blond opened this issue Apr 15, 2017 · 0 comments
Open
2 tasks

Strict arguments #109

blond opened this issue Apr 15, 2017 · 0 comments
Milestone

Comments

@blond
Copy link
Member

blond commented Apr 15, 2017

I think we can throw errors for methods, that expect BemEntityName instances but gets other type.

  • isEqual
  • belongsTo

Example:

const name = new BemEntityName({ block: 'button' });

name.isEqual({ block: 'button' }) // Error: the `BemEntityName.isEqual` method expect instance of BemEntityName
@blond blond added question and removed question labels Apr 15, 2017
@blond blond added this to the 2.0 milestone Apr 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant