Skip to main content

withErrorBoundary

Summary

Decorator for adding error boundary protection to methods.

Signature

export declare function withErrorBoundary<T extends (...args: any[]) => any>(context?: ErrorContext): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;

Parameters

context

Type: ErrorContext Optional: Yes

Returns

Type: (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor Decorator for adding error boundary protection to methods.