#' @export
`$.{{ type_name }}` <- function(self, name) {
  func <- {{ type_name }}[[name]]
  if (identical(names(formals(func))[1], "self")) {
    function(...) func(self, ...)
  } else {
    func
  }
}
