1- import { convertIntegrationFnToClass , defineIntegration } from '@sentry/core' ;
2- import type { Integration , IntegrationClass , IntegrationFn } from '@sentry/types' ;
3- import { ScreenshotButton } from './screenshotButton' ;
4- import { ScreenshotWidget } from './screenshotWidget' ;
5- import { GLOBAL_OBJ } from '@sentry/utils' ;
6- import { h , render } from 'preact' ;
1+ import { convertIntegrationFnToClass , defineIntegration } from '@sentry/core' ;
2+ import type { Integration , IntegrationClass , IntegrationFn } from '@sentry/types' ;
3+ import { ScreenshotButton } from './screenshotButton' ;
4+ import { ScreenshotWidget } from './screenshotWidget' ;
5+ import { GLOBAL_OBJ } from '@sentry/utils' ;
6+ import { h , render } from 'preact' ;
77
88interface FeedbackScreenshotOptions {
99 el : Element ;
@@ -19,13 +19,18 @@ const INTEGRATION_NAME = 'FeedbackScreenshot';
1919const WINDOW = GLOBAL_OBJ as typeof GLOBAL_OBJ & Window ;
2020
2121/** Exported only for type safe tests. */
22- export const _feedbackScreenshotIntegration = ( ( options : Partial < FeedbackScreenshotOptions > = { } ) => {
22+ export const _feedbackScreenshotIntegration = ( (
23+ options : Partial < FeedbackScreenshotOptions > = { }
24+ ) => {
2325 return {
2426 name : INTEGRATION_NAME ,
2527 // eslint-disable-next-line @typescript-eslint/no-empty-function
2628 setupOnce ( ) { } ,
2729 getOptions ( ) : FeedbackScreenshotIntegrationOptions {
28- return { el : options . el || WINDOW . document . createElement ( 'div' ) , props : options . props || null } ;
30+ return {
31+ el : options . el || WINDOW . document . createElement ( 'div' ) ,
32+ props : options . props || null ,
33+ } ;
2934 } ,
3035 renderScreenshotWidget : ( options : FeedbackScreenshotOptions ) => {
3136 return render ( < ScreenshotWidget /> , options . el ) ;
@@ -39,15 +44,17 @@ export const _feedbackScreenshotIntegration = ((options: Partial<FeedbackScreens
3944/**
4045 * Add this in addition to `replayIntegration()` to enable canvas recording.
4146 */
42- export const feedbackScreenshotIntegration = defineIntegration ( _feedbackScreenshotIntegration ) ;
47+ export const feedbackScreenshotIntegration = defineIntegration (
48+ _feedbackScreenshotIntegration
49+ ) ;
4350
4451/**
4552 * @deprecated Use `feedbackScreenshotIntegration()` instead
4653 */
4754// eslint-disable-next-line deprecation/deprecation
4855export const FeedbackScreenshot = convertIntegrationFnToClass (
4956 INTEGRATION_NAME ,
50- feedbackScreenshotIntegration ,
57+ feedbackScreenshotIntegration
5158) as IntegrationClass <
5259 Integration & {
5360 getOptions : ( ) => FeedbackScreenshotIntegrationOptions ;
0 commit comments