Skip to content

Commit

Permalink
Merge pull request #17 from laxmanpokhrel/dev
Browse files Browse the repository at this point in the history
dev
  • Loading branch information
laxmanpokhrel authored Feb 28, 2024
2 parents 9984790 + 56f2aed commit bca4f2c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Ignore source files
src/
*.js
*.ts

# Ignore development tools and configuration files
node_modules/
Expand Down
2 changes: 1 addition & 1 deletion .release/config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"versionUpgradeType": "major",
"versionUpgradeType": "patch",
"releaseType": "--prerelease"
}
1 change: 1 addition & 0 deletions .release/release-notes.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Changes
- prerelease for type module
- npm ignore fix
3 changes: 2 additions & 1 deletion lib/@types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ export type ErrorComponentProps = {
errorLocation: string;
errorMessage: string | undefined;
};
export type ErrorComponentType = (props?: ErrorComponentProps) => JSX.Element;
export type ErrorComponentType = (props: ErrorComponentProps) => JSX.Element;
export type ContextValueType = {
errorComponent?: ErrorComponentType;
};
export type GoodComponent<T> = (props: React.PropsWithChildren<T>) => React.JSX.Element;
3 changes: 2 additions & 1 deletion lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import ErrorBoundaryProvider from './context/ErrorBoundaryProvider';
import { GoodComponent } from './@types';
/**
* This is a higher-order function that wraps a React component with an error boundary.
* @param WrappedComponent - a React component that will be wrapped with an error boundary.
Expand All @@ -8,5 +9,5 @@ import ErrorBoundaryProvider from './context/ErrorBoundaryProvider';
* actual higher-order component that takes in `props` and returns the `ErrorBoundary` component with
* the `WrappedComponent` passed as a child with the `props` spread into it.
*/
declare function hasErrorBoundary<T>(WrappedComponent: React.ComponentType<React.PropsWithChildren<React.PropsWithChildren<T>>>): (props: React.PropsWithChildren<T>) => React.JSX.Element;
declare function hasErrorBoundary<T>(WrappedComponent: React.ComponentType<React.PropsWithChildren<React.PropsWithChildren<T>>>): GoodComponent<T>;
export { hasErrorBoundary, ErrorBoundaryProvider };
2 changes: 1 addition & 1 deletion lib/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bca4f2c

Please sign in to comment.