Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@legendapp/tools

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@legendapp/tools - npm Package Compare versions

Comparing version 2.0.0-alpha.9 to 2.0.0-alpha.10

2

package.json

@@ -6,3 +6,3 @@ {

"private": false,
"version": "2.0.0-alpha.9",
"version": "2.0.0-alpha.10",
"license": "MIT",

@@ -9,0 +9,0 @@ "main": "./index.js",

@@ -1,2 +0,2 @@

import { ComponentType } from 'react';
import { ComponentType, FC } from 'react';
declare type TypeOnError = (error: Error, info: ErrorInfo) => boolean | void;

@@ -8,2 +8,5 @@ export interface ErrorInfo {

onError?: TypeOnError;
ErrorBoundary?: FC<{
onError?: TypeOnError;
}>;
}

@@ -10,0 +13,0 @@ export declare function configureMemoFnComponent(config: Config): void;

@@ -33,3 +33,3 @@ "use strict";

exports.configureMemoFnComponent = configureMemoFnComponent;
class ErrorBoundary extends react_1.Component {
class DefaultErrorBoundary extends react_1.Component {
constructor(props) {

@@ -72,3 +72,4 @@ super(props);

if (onError) {
out = (props) => (react_1.default.createElement(ErrorBoundary, null, (0, react_1.createElement)(Component, Object.assign({ onError }, props))));
const ErrorBoundary = _config.ErrorBoundary || DefaultErrorBoundary;
out = (props) => react_1.default.createElement(ErrorBoundary, { onError: onError }, (0, react_1.createElement)(Component, props));
}

@@ -80,4 +81,6 @@ return (0, react_1.memo)(out);

let out = Component;
if (onError || _config.onError) {
const Wrapped = (props, ref) => (react_1.default.createElement(ErrorBoundary, null, (0, react_1.createElement)(Component, Object.assign({ onError, ref }, props))));
onError = onError || _config.onError;
if (onError) {
const ErrorBoundary = _config.ErrorBoundary || DefaultErrorBoundary;
const Wrapped = (props, ref) => (react_1.default.createElement(ErrorBoundary, { onError: onError }, (0, react_1.createElement)(Component, Object.assign({ ref }, props))));
out = (0, react_1.forwardRef)(Wrapped);

@@ -84,0 +87,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc