Richer types for directives