type directive factory with Function type

- the existing type fails with the stricter 0.9.5 compiler
mocha's run callback is optional
Merge pull request #1214 from ashwinr/master

type directive factory with Function type