Skip to content

Commit

Permalink
Patch(functions): optional params in types
Browse files Browse the repository at this point in the history
Closes #91
  • Loading branch information
Akalanka47000 committed Jan 2, 2024
1 parent 6ea8d7a commit 4852cc1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/functions/types/traced.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@
* @param loggable Object with extra information to be logged
* @returns Returns the result of the function
*/
export function trace(fn: Function, loggable: Record<any, any>): Promise<void>;
export function trace(fn: Function, loggable?: Record<any, any>): Promise<void>;

/**
* @description Creates a new function which when invoked will invoke the given function with tracing
* @param fn The function to be invoked asynchronously
* @param loggable Object with extra information to be logged
* @returns Returns the new function
*/
export function traced(fn: Function, loggable: Record<any, any>): Function;
export function traced(fn: Function, loggable?: Record<any, any>): Function;

/**
* @description Invokes the given function with tracing. Tracing is however ignored if the function is an anonymous function
* @param fn The function to be invoked asynchronously
* @param loggable Object with extra information to be logged
* @returns Returns the result of the function
*/
export function cleanTrace(fn: Function, loggable: Record<any, any>): Promise<void>;
export function cleanTrace(fn: Function, loggable?: Record<any, any>): Promise<void>;

/**
* @description Creates a new function which when invoked will invoke the given function with tracing. Tracing is however ignored if the function is an anonymous function
* @param fn The function to be invoked asynchronously
* @param loggable Object with extra information to be logged
* @returns Returns the new function
*/
export function cleanTraced(fn: Function, loggable: Record<any, any>): Function;
export function cleanTraced(fn: Function, loggable?: Record<any, any>): Function;

export default {
traced,
Expand Down

0 comments on commit 4852cc1

Please sign in to comment.