Skip to content

Commit 8cc4b94

Browse files
committed
style: fmt & refactor
1 parent 98d3ac3 commit 8cc4b94

File tree

2 files changed

+10
-36
lines changed

2 files changed

+10
-36
lines changed

index.d.ts

Lines changed: 0 additions & 33 deletions
This file was deleted.

index.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ import * as Sentry from "@sentry/node";
55
// @ts-ignore: missing type definitions
66
import { dummyLayout } from "log4js/lib/layouts";
77

8-
import type { SeverityLevel, User } from "@sentry/node/types";
9-
import type { NodeClientOptions } from "@sentry/node/types/types";
8+
import type {
9+
SeverityLevel,
10+
User,
11+
} from "@sentry/node";
12+
import type { NodeClientOptions } from "@sentry/node/build/types/types";
1013
import type {
1114
AppenderFunction,
1215
LayoutFunction,
@@ -28,6 +31,10 @@ export interface Config extends Partial<NodeClientOptions> {
2831
* Sentry user data for scope setting
2932
*/
3033
user?: User;
34+
/**
35+
* Levels to be reported to Sentry.
36+
*/
37+
levels?: SentryAppenderLevels[];
3138
}
3239

3340
declare module "log4js" {
@@ -95,9 +102,9 @@ export function sentry(
95102
}
96103

97104
export class ConfigError extends Error {
98-
override name = "ConfigError";
99105
constructor(msg: string, cause?: unknown) {
100106
super(msg);
107+
this.name = this.constructor.name;
101108
this.cause = cause;
102109
}
103110
}

0 commit comments

Comments
 (0)