Skip to content

Commit d7789d8

Browse files
committed
Use <Partial> for options types
1 parent 09718ba commit d7789d8

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

packages/browser/src/integrations/breadcrumbs.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ export interface SentryWrappedXMLHttpRequest extends XMLHttpRequest {
2626

2727
/** JSDoc */
2828
interface BreadcrumbsOptions {
29-
console?: boolean;
30-
dom?: boolean;
31-
fetch?: boolean;
32-
history?: boolean;
33-
sentry?: boolean;
34-
xhr?: boolean;
29+
console: boolean;
30+
dom: boolean;
31+
fetch: boolean;
32+
history: boolean;
33+
sentry: boolean;
34+
xhr: boolean;
3535
}
3636

3737
/**
@@ -55,7 +55,7 @@ export class Breadcrumbs implements Integration {
5555
/**
5656
* @inheritDoc
5757
*/
58-
public constructor(options?: BreadcrumbsOptions) {
58+
public constructor(options?: Partial<BreadcrumbsOptions>) {
5959
this._options = {
6060
console: true,
6161
dom: true,

packages/browser/src/integrations/trycatch.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ const DEFAULT_EVENT_TARGET = [
3838
type XMLHttpRequestProp = 'onload' | 'onerror' | 'onprogress' | 'onreadystatechange';
3939

4040
interface TryCatchOptions {
41-
setTimeout?: boolean;
42-
setInterval?: boolean;
43-
requestAnimationFrame?: boolean;
44-
XMLHttpRequest?: boolean;
41+
setTimeout: boolean;
42+
setInterval: boolean;
43+
requestAnimationFrame: boolean;
44+
XMLHttpRequest: boolean;
4545
eventTarget: boolean | string[];
4646
}
4747

@@ -63,7 +63,7 @@ export class TryCatch implements Integration {
6363
/**
6464
* @inheritDoc
6565
*/
66-
public constructor(options?: TryCatchOptions) {
66+
public constructor(options?: Partial<TryCatchOptions>) {
6767
this._options = {
6868
setTimeout: true,
6969
setInterval: true,

0 commit comments

Comments
 (0)