Skip to content

Commit

Permalink
improve naming
Browse files Browse the repository at this point in the history
  • Loading branch information
neSpecc committed Oct 13, 2024
1 parent 6219910 commit 19f70da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/hawk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ let hawk: HawkCatcher | null = null;
* Composable for tracking errors via Hawk.so
*/
export function useErrorTracker(): {
initHawk: (options: ErrorTrackerInitialOptions) => void;
init: (options: ErrorTrackerInitialOptions) => void;
track: (...args: Parameters<HawkCatcher['send']>) => void;
} {
/**
* Initialize Hawk.so
*
* @param options - params to be passed to hawk initialization
*/
function initHawk({ vue, user }: ErrorTrackerInitialOptions): void {
function init({ vue, user }: ErrorTrackerInitialOptions): void {
if (process.env.VUE_APP_HAWK_TOKEN) {
const hawkOptions: HawkInitialSettings = {
token: process.env.VUE_APP_HAWK_TOKEN,
Expand Down Expand Up @@ -69,7 +69,7 @@ export function useErrorTracker(): {
}

return {
initHawk,
init,
track,
};
}
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import UniqueId from 'vue-unique-id';
import { Analytics } from './analytics';
import { useErrorTracker, ErrorTrackerInitialOptions } from './hawk';

const { initHawk, track } = useErrorTracker();
const { init: initHawk, track } = useErrorTracker();

/**
* Enable errors tracking via Hawk.so
Expand Down

0 comments on commit 19f70da

Please sign in to comment.