* refactor(patching): return type annotations * lint: fix * refactor(patching): type alias
close #6683 ref #5268 ref #5278
close #5632 Co-authored-by: Zoltan Kochan <z@kochan.io>