Sentry/V8/Removal Of Void From Transport Return Types
This codemod removes the void
return type from the send
method of the Transport
interface, ensuring that the method always returns a TransportMakeRequestResponse
in the promise. This change aligns with the updated requirements in Sentry 8.x.
Example
Before
interface Transport {send(event: Event): Promise < void | TransportMakeRequestResponse > ;}
After
interface Transport {send(event: Event): Promise < TransportMakeRequestResponse > ;}
,
Before
type TransportSend = (event: Event,) => Promise < void | TransportMakeRequestResponse > ;
After
type TransportSend = (event: Event) => Promise < TransportMakeRequestResponse > ;
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community