type safety for editor hooks