carloscuesta/react-native-error-boundary

Add typescript support

Closed this issue · 3 comments

Hi, please add typescript support, create index.d.ts file and set key 'types' in package.json.

Thanks

declare module 'react-native-error-boundary' {
  import React from 'react';

  export type ErrorBoundaryProps = {
    children: React.ReactNode;
    onError?: (error: Error, stackTrace: string) => void;
    FallbackComponent?: React.ComponentType<{ error: Error; resetError: () => void }>;
  };

  export default class ErrorBoundary extends React.Component<ErrorBoundaryProps> {}
}

Can you take a look at the pr ? @Punisher97

Released at 1.1.0 🎉