Enforce type checking for the 'version' argument in directives.ts