The worker self object is simply cast to any to make sure typescript does not complain. Actual typecheck may be restored once the following issue is fixed: https://github.com/microsoft/TypeScript/issues/20595
Fixes #8660.