extend typeof directive