Add support for typehinted arguments in definitions

Fixes #621