Skip to content

Commit a02cf33

Browse files
committed
docs: linter fixes
1 parent 31d54df commit a02cf33

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

packages/core/src/messages/message-processor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Breadcrumb, CatcherMessagePayload, CatcherMessageType } from '@hawk.so/types';
1+
import type { CatcherMessagePayload, CatcherMessageType } from '@hawk.so/types';
22

33
/**
44
* Extracted addons type from catcher message payload.

packages/javascript/src/messages/browser-breadcrumbs-message-processor.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
import type { MessageProcessor, ProcessingPayload } from '@hawk.so/core';
2-
import { BreadcrumbsOptions, BrowserBreadcrumbStore } from '../addons/breadcrumbs';
3-
import { ErrorsCatcherType } from '@hawk.so/types/src/catchers/catcher-message';
2+
import type { BreadcrumbsOptions } from '../addons/breadcrumbs';
3+
import { BrowserBreadcrumbStore } from '../addons/breadcrumbs';
4+
import type { ErrorsCatcherType } from '@hawk.so/types/src/catchers/catcher-message';
45

56
/**
67
* Attaches breadcrumbs to payload.
78
*/
8-
export class BrowserBreadcrumbsMessageProcessor<T extends ErrorsCatcherType> implements MessageProcessor<T> {
9-
9+
export class BrowserBreadcrumbsMessageProcessor<T extends ErrorsCatcherType> implements MessageProcessor<T> {
10+
/**
11+
* Initialize message processor including {@link BrowserBreadcrumbStore} initialization.
12+
*
13+
* @param options {@link BrowserBreadcrumbStore} settings required for initialization.
14+
*/
1015
constructor(options: BreadcrumbsOptions = {}) {
1116
const breadcrumbStore = BrowserBreadcrumbStore.getInstance();
17+
1218
breadcrumbStore.init(options);
1319
}
1420

@@ -22,6 +28,7 @@ export class BrowserBreadcrumbsMessageProcessor<T extends ErrorsCatcherType> imp
2228
payload: ProcessingPayload<T>
2329
): ProcessingPayload<T> | null {
2430
const breadcrumbs = BrowserBreadcrumbStore.getInstance().get();
31+
2532
if (breadcrumbs.length > 0) {
2633
payload.breadcrumbs = breadcrumbs;
2734
}

packages/javascript/src/messages/debug-addon-message-processor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class DebugAddonMessageProcessor implements MessageProcessor<'errors/java
1414
*/
1515
public apply(
1616
payload: ProcessingPayload<'errors/javascript'>,
17-
error?: Error | string,
17+
error?: Error | string
1818
): ProcessingPayload<'errors/javascript'> | null {
1919
if (!(error instanceof Error)) {
2020
return payload;

0 commit comments

Comments
 (0)