hook: add typed config methods
Merge pull request #19 from rogpeppe/020-typed-config

hook: add typed config methods