hook: add typed config methods

This makes it more convenient to retrieve config values.