jackbrewer/stylus-mixins — pull request #6 by timjgleeson (2014-04-01 06:45:50+00:00)
Title: add paramter expectations to mixins

I saw this being used in stylus core (https://github.com/LearnBoost/stylus/blob/master/lib/functions/index.styl) to make sure that the variables being passed to their mixins where the right type. I figured it would be good to have that in stylus-mixins.

If, say, ie('string') was used, the compiler will bring back a message telling the person that $version was expecting to be a unit, not a string. I don't think I can make the below any prettier though.

```
Error: ../stylus-mixins/node_modules/stylus-test-runner/node_modules/stylus/lib/functions/index.styl:19
15|
16| require-unit(n)
17| unless n is a 'unit'
18| error('unit expected, got a ' + -string(n))
> 19|
20| // require a string
21|
22| require-string(str)

unit expected, got a string test
at require-unit() (/private/var/application/Clock/Internal/stylus-mixins/node_modules/stylus-test-runner/node_modules/stylus/lib/functions/index.styl:17)
at ie() (/private/var/application/Clock/Internal/stylus-mixins/lib/stylus-mixins/ie.styl:38)
at ".class" (stylus:11)
```