Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions build/src/catchers/catcher-message.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ export interface CatcherMessage<Type extends CatcherMessageType> {
* All information about the event
*/
payload: CatcherMessagePayload<Type>;
/**
* Number of identical occurrences this message represents.
* Computed on Catcher side to dedupe similar events caused in the same time.
*/
count?: number;
}
/**
* Type that represents a Catcher message accepted by the collector
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hawk.so/types",
"version": "0.6.0-rc.2",
"version": "0.6.1",
"description": "TypeScript definitions for Hawk",
"types": "build/index.d.ts",
"main": "build/index.js",
Expand Down
6 changes: 6 additions & 0 deletions src/catchers/catcher-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ export interface CatcherMessage<Type extends CatcherMessageType> {
* All information about the event
*/
payload: CatcherMessagePayload<Type>;

/**
* Number of identical occurrences this message represents.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Number of identical occurrences this message represents.
* Number of identical occurrences this message represents. Computed on Catcher side to dedupe similar events caused in the same time.

* Computed on Catcher side to dedupe similar events caused in the same time.
*/
count?: number;
}

/**
Expand Down
Loading