@@ -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
3333const 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 ,
@@ -157,7 +157,7 @@ export class RequestData implements Integration {
157157/** Convert this integration's options to match what `addRequestDataToEvent` expects */
158158/** TODO: Can possibly be deleted once https://github.com/getsentry/sentry-javascript/issues/5718 is fixed */
159159function convertReqDataIntegrationOptsToAddReqDataOpts (
160- integrationOptions : RequestDataIntegrationOptions ,
160+ integrationOptions : Required < RequestDataIntegrationOptions > ,
161161) : AddRequestDataToEventOptions {
162162 const { transactionNamingScheme } = integrationOptions ;
163163 const { ip, user, ...requestOptions } = integrationOptions . include ;
0 commit comments