Skip to content

Commit adb7897

Browse files
authored
Merge pull request #105 from slavikdenis/master
Added typescript typings
2 parents a88c04b + 2e32fb5 commit adb7897

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

index.d.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export type JSExceptionHandler = (error: Error, isFatal: boolean) => void;
2+
export type NativeExceptionHandler = (exceptionMsg: string) => void;
3+
4+
declare const getJSExceptionHandler: () => JSExceptionHandler;
5+
6+
declare const setJSExceptionHandler: (handler: JSExceptionHandler, allowInDevMode?: boolean) => void;
7+
8+
declare const setNativeExceptionHandler: (
9+
handler: NativeExceptionHandler,
10+
forceAppQuit?: boolean, // Android only
11+
executeDefaultHandler?: boolean,
12+
) => void;

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "2.10.7",
44
"description": "A react native module that lets you to register a global error handler that can capture fatal/non fatal uncaught exceptions.",
55
"main": "index.js",
6+
"typings": "index.d.ts",
67
"scripts": {
78
"test": "echo no tests && exit 1",
89
"lint": "eslint app/",

0 commit comments

Comments
 (0)