From eee669cc9cca1e1fc0f51c70bc17926610fc551e Mon Sep 17 00:00:00 2001 From: delphinus Date: Thu, 31 Mar 2016 00:25:48 +0900 Subject: [PATCH] Correct return values --- stacktrace-js/stacktrace-js.d.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/stacktrace-js/stacktrace-js.d.ts b/stacktrace-js/stacktrace-js.d.ts index aebd6ddf80..045cf70104 100644 --- a/stacktrace-js/stacktrace-js.d.ts +++ b/stacktrace-js/stacktrace-js.d.ts @@ -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(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(fn: TFunc): TFunc; /** * Given an Array of StackFrames, serialize and POST to given URL.