Add support for typed worker functions