you cannot to use type as parameter. There should be some typed value - likejsonb_object_field, '{"a":10}', 'a', NULL::int)and return type should be anyelement.
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных