fix: Typescript typings#1134
Conversation
typescript/raven.d.ts
Outdated
| }; | ||
| onSuccess: () => void; | ||
| onFailure: () => void; | ||
| onError: (error: Error & { request: XMLHttpRequest }) => void; |
There was a problem hiding this comment.
I don't know TS syntax much, so is this request already optional by using &, or does it have to be annotated somehow? Because it can be omitted in the code.
There was a problem hiding this comment.
It's not, that'd have to be request?:
There was a problem hiding this comment.
@kamilogorek @SimonSchick I actually went through the code and thought that request is always set, but if you think it should be optional, it's fine with me - adjusted
typescript/raven.d.ts
Outdated
| }; | ||
| onSuccess: () => void; | ||
| onFailure: () => void; | ||
| onError: (error: Error & { request: XMLHttpRequest }) => void; |
There was a problem hiding this comment.
It's not, that'd have to be request?:
typescript/raven.d.ts
Outdated
| @@ -264,7 +266,7 @@ declare module Raven { | |||
| sentry_key: string; | |||
| }; | |||
| onSuccess: () => void; | |||
There was a problem hiding this comment.
Btw: onSuccess(): void in generally shorter and preferred for interfaces.
|
@SimonSchick @kamilogorek thx for the review, anything else I'm missing? |
|
Looks good to me. Thanks! |
Fixes Dependabot alert #1134. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Fixes Dependabot alert #1134. Co-authored-by: Claude Opus 4.6 <[email protected]>
Before submitting a pull request, please verify the following:
I tried applying the hack described here - #339 (comment) - in my angular (typescript) application, when I noticed that some types don't match.
I went through the implementation and hope that I've renamed / adjusted everything correctly. Would be cool if you could merge and release these fixes soon. Thx