Add typescript support
Closed this issue · 3 comments
msvargas commented
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> {}
}
carloscuesta commented
Hi @Punisher97 I'm not quite used to TypeScript, let me set up a PR
https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html
carloscuesta commented
Can you take a look at the pr ? @Punisher97
carloscuesta commented
Released at 1.1.0
🎉