Canvas: use class decorators to register types