1
- import { Event , EventHint , Options , Severity } from '@sentry/types' ;
1
+ import { Event , EventHint , Severity } from '@sentry/types' ;
2
2
import {
3
3
addExceptionMechanism ,
4
4
addExceptionTypeValue ,
@@ -20,7 +20,7 @@ import { eventFromError, eventFromPlainObject, parseStackFrames } from './parser
20
20
export function eventFromException (
21
21
exception : unknown ,
22
22
hint ?: EventHint ,
23
- attachStacktrace ?: Options [ 'attachStacktrace' ] ,
23
+ attachStacktrace ?: boolean ,
24
24
) : PromiseLike < Event > {
25
25
const syntheticException = ( hint && hint . syntheticException ) || undefined ;
26
26
const event = eventFromUnknownInput ( exception , syntheticException , attachStacktrace ) ;
@@ -40,7 +40,7 @@ export function eventFromMessage(
40
40
message : string ,
41
41
level : Severity = Severity . Info ,
42
42
hint ?: EventHint ,
43
- attachStacktrace ?: Options [ 'attachStacktrace' ] ,
43
+ attachStacktrace ?: boolean ,
44
44
) : PromiseLike < Event > {
45
45
const syntheticException = ( hint && hint . syntheticException ) || undefined ;
46
46
const event = eventFromString ( message , syntheticException , attachStacktrace ) ;
@@ -57,7 +57,7 @@ export function eventFromMessage(
57
57
export function eventFromUnknownInput (
58
58
exception : unknown ,
59
59
syntheticException ?: Error ,
60
- attachStacktrace ?: Options [ 'attachStacktrace' ] ,
60
+ attachStacktrace ?: boolean ,
61
61
isUnhandledRejection ?: boolean ,
62
62
) : Event {
63
63
let event : Event ;
@@ -129,11 +129,7 @@ export function eventFromUnknownInput(
129
129
/**
130
130
* @hidden
131
131
*/
132
- export function eventFromString (
133
- input : string ,
134
- syntheticException ?: Error ,
135
- attachStacktrace ?: Options [ 'attachStacktrace' ] ,
136
- ) : Event {
132
+ export function eventFromString ( input : string , syntheticException ?: Error , attachStacktrace ?: boolean ) : Event {
137
133
const event : Event = {
138
134
message : input ,
139
135
} ;
0 commit comments