Add optional type support to web.haste()