Skip to content

Commit f7c3b16

Browse files
authored
Merge pull request feathersjs-ecosystem#500 from brane53/master
update type definition for debug hook
2 parents fe39699 + b13db45 commit f7c3b16

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export function combine(...hooks: Hook[]): Hook;
107107
* Display the current hook context for debugging.
108108
* {@link https://feathers-plus.github.io/v1/feathers-hooks-common/index.html#Debug}
109109
*/
110-
export function debug(): Hook;
110+
export function debug(msg: string, ...fieldNames: string[]): Hook;
111111

112112
/**
113113
* Deletes a property from an object using dot notation, e.g. address.city. (Utility function.)

types/tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ checkContextIf(context1, 'before', ['update', 'patch'], 'hookName');
133133
combine(hook1, hook2, hook3);
134134

135135
// $ExpectType Hook
136-
debug();
136+
debug('label', 'abc.def', 'ghi.jkl');
137137

138138
// $ExpectType void
139139
deleteByDot({}, 'abc.def');

0 commit comments

Comments
 (0)