8000 ref(node): Support TS4.4 exactOptionalPropertyTypes in NodeOptions an… · carlitose/sentry-javascript@61d3b4a · GitHub
[go: up one dir, main page]

Skip to content

Commit 61d3b4a

Browse files
committed
ref(node): Support TS4.4 exactOptionalPropertyTypes in NodeOptions and NodeBackend
1 parent 8169917 commit 61d3b4a

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

packages/node/src/backend.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class NodeBackend extends BaseBackend<NodeOptions> {
2424
* @inheritDoc
2525
*/
2626
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
27-
public eventFromException(exception: any, hint?: EventHint): PromiseLike<Event> {
27+
public eventFromException(exception: any, hint?: EventHint | undefined): PromiseLike<Event> {
2828
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2929
let ex: any = exception;
3030
const providedMechanism: Mechanism | undefined =
@@ -73,7 +73,11 @@ export class NodeBackend extends BaseBackend<NodeOptions> {
7373
/**
7474
* @inheritDoc
7575
*/
76-
public eventFromMessage(message: string, level: Severity = Severity.Info, hint?: EventHint): PromiseLike<Event> {
76+
public eventFromMessage(
77+
message: string,
78+
level: Severity = Severity.Info,
79+
hint?: EventHint | undefined,
80+
): PromiseLike<Event> {
7781
const event: Event = {
7882
event_id: hint && hint.event_id,
7983
level,

packages/node/src/types.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@ import { Options } from '@sentry/types';
66
*/
77
export interface NodeOptions extends Options {
88
/** Sets an optional server name (device name) */
9-
serverName?: string;
9+
serverName?: string | undefined;
1010

1111
/** Maximum time in milliseconds to wait to drain the request queue, before the process is allowed to exit. */
12-
shutdownTimeout?: number;
12+
shutdownTimeout?: number | undefined;
1313

1414
/** Set a HTTP proxy that should be used for outbound requests. */
15-
httpProxy?: string;
15+
httpProxy?: string | undefined;
1616

1717
/** Set a HTTPS proxy that should be used for outbound requests. */
18-
httpsProxy?: string;
18+
httpsProxy?: string | undefined;
1919

2020
/** HTTPS proxy certificates path */
21-
caCerts?: string;
21+
caCerts?: string | undefined;
2222

2323
/** Sets the number of context lines for each frame when loading a file. */
24-
frameContextLines?: number;
24+
frameContextLines?: number | undefined;
2525

2626
/** Callback that is executed when a fatal global error occurs. */
27-
onFatalError?(error: Error): void;
27+
onFatalError?(error: Error): void | undefined;
2828
}

0 commit comments

Comments
 (0)
0