Skip to content

Commit 49c1b6b

Browse files
committed
make options optional
1 parent e716777 commit 49c1b6b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/node/src/integrations/requestdata.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type RequestDataIntegrationOptions = {
1010
/**
1111
* Controls what data is pulled from the request and added to the event
1212
*/
13-
include: {
13+
include?: {
1414
cookies?: boolean;
1515
data?: boolean;
1616
headers?: boolean;
@@ -27,7 +27,7 @@ type RequestDataIntegrationOptions = {
2727
};
2828

2929
/** Whether to identify transactions by parameterized path, parameterized path with method, or handler name */
30-
transactionNamingScheme: TransactionNamingScheme;
30+
transactionNamingScheme?: TransactionNamingScheme;
3131
};
3232

3333
const DEFAULT_OPTIONS = {
@@ -67,12 +67,12 @@ export class RequestData implements Integration {
6767
*/
6868
protected _addRequestData: (event: Event, req: PolymorphicRequest, options?: { [key: string]: unknown }) => Event;
6969

70-
private _options: RequestDataIntegrationOptions;
70+
private _options: Required<RequestDataIntegrationOptions>;
7171

7272
/**
7373
* @inheritDoc
7474
*/
75-
public constructor(options: Partial<RequestDataIntegrationOptions> = {}) {
75+
public constructor(options: RequestDataIntegrationOptions = {}) {
7676
this._addRequestData = addRequestDataToEvent;
7777
this._options = {
7878
...DEFAULT_OPTIONS,
@@ -155,7 +155,7 @@ export class RequestData implements Integration {
155155
/** Convert this integration's options to match what `addRequestDataToEvent` expects */
156156
/** TODO: Can possibly be deleted once https://github.com/getsentry/sentry-javascript/issues/5718 is fixed */
157157
function convertReqDataIntegrationOptsToAddReqDataOpts(
158-
integrationOptions: RequestDataIntegrationOptions,
158+
integrationOptions: Required<RequestDataIntegrationOptions>,
159159
): AddRequestDataToEventOptions {
160160
const {
161161
transactionNamingScheme,

0 commit comments

Comments
 (0)