Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More options #11

Merged
merged 2 commits into from May 2, 2021
Merged

More options #11

merged 2 commits into from May 2, 2021

Conversation

Toilal
Copy link
Contributor

@Toilal Toilal commented Dec 5, 2019

This brings better TypeScript definition, and a new option errorHandler that can be used to override the default error handling.

It may be used to ignore errors on unsupported property types, like Function.

options = {
  errorHandler: (context, options, object, throw_) => {
    if (_.isFunction(object)) {
      // Ignore the error
    } else {
      // Throw the default error
      throw_()
    }
  }
}

@erossignon erossignon merged commit fb85298 into erossignon:master May 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants