mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 20:39:17 +08:00
Correct return values
This commit is contained in:
8
stacktrace-js/stacktrace-js.d.ts
vendored
8
stacktrace-js/stacktrace-js.d.ts
vendored
@@ -49,18 +49,20 @@ declare namespace StackTrace {
|
||||
*
|
||||
* @param {Function} fn to be instrumented
|
||||
* @param {Function} callback function to call with a stack trace on invocation
|
||||
* @param {Function} errorCallback optional function to call with error if unable to get stack trace.
|
||||
* @param {Function} errback optional function to call with error if unable to get stack trace.
|
||||
* @param {Object} thisArg optional context object (e.g. window)
|
||||
* @return {Function} instrumented function
|
||||
*/
|
||||
export function instrument(fn:() => void, callback:(stackFrames:StackFrame[]) => void, errorCallback:(error:Error) => void, thisArg?:any): void;
|
||||
export function instrument<TFunc extends Function>(fn: TFunc, callback: (stackFrames:StackFrame[]) => void, errback?: (error: Error) => void, thisArg?: any): TFunc;
|
||||
|
||||
/**
|
||||
* Given a function that has been instrumented,
|
||||
* revert the function to it's original (non-instrumented) state.
|
||||
*
|
||||
* @param fn {Function}
|
||||
* @return {Function} original function
|
||||
*/
|
||||
export function deinstrument(fn:() => void): void;
|
||||
export function deinstrument<TFunc extends Function>(fn: TFunc): TFunc;
|
||||
|
||||
/**
|
||||
* Given an Array of StackFrames, serialize and POST to given URL.
|
||||
|
||||
Reference in New Issue
Block a user