Skip to content

Commit

Permalink
Merge pull request #105 from slavikdenis/master
Browse files Browse the repository at this point in the history
Added typescript typings
  • Loading branch information
a7ul authored May 15, 2019
2 parents a88c04b + 2e32fb5 commit adb7897
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export type JSExceptionHandler = (error: Error, isFatal: boolean) => void;
export type NativeExceptionHandler = (exceptionMsg: string) => void;

declare const getJSExceptionHandler: () => JSExceptionHandler;

declare const setJSExceptionHandler: (handler: JSExceptionHandler, allowInDevMode?: boolean) => void;

declare const setNativeExceptionHandler: (
handler: NativeExceptionHandler,
forceAppQuit?: boolean, // Android only
executeDefaultHandler?: boolean,
) => void;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "2.10.7",
"description": "A react native module that lets you to register a global error handler that can capture fatal/non fatal uncaught exceptions.",
"main": "index.js",
"typings": "index.d.ts",
"scripts": {
"test": "echo no tests && exit 1",
"lint": "eslint app/",
Expand Down

0 comments on commit adb7897

Please sign in to comment.