Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/script/src/runtime/registry/ahrefs-analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ export interface AhrefsAnalyticsApi {
}

declare global {
interface Window extends AhrefsAnalyticsApi {}
// Declared inline rather than via `extends`: an `extends` clause on the global `Window`
// surfaces as an unsuppressable TS2430 in consumer code when another package declares it (#852).
interface Window {
AhrefsAnalytics: AhrefsAnalyticsApi['AhrefsAnalytics']
}
}

/**
Expand Down
6 changes: 5 additions & 1 deletion packages/script/src/runtime/registry/calendly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ export interface CalendlyApi {
}

declare global {
interface Window extends CalendlyApi {}
// Declared inline rather than via `extends`: an `extends` clause on the global `Window`
// surfaces as an unsuppressable TS2430 in consumer code when another package declares it (#852).
interface Window {
Calendly: CalendlyApi['Calendly']
}
}

const CALENDLY_CSS_KEY = 'nuxt-scripts-calendly-css'
Expand Down
6 changes: 5 additions & 1 deletion packages/script/src/runtime/registry/clarity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ export interface ClarityApi {
}

declare global {
interface Window extends ClarityApi {}
// Declared inline rather than via `extends`: an `extends` clause on the global `Window`
// surfaces as an unsuppressable TS2430 in consumer code when another package declares it (#852).
interface Window {
clarity: ClarityApi['clarity']
}
}

export type ClarityInput = RegistryScriptInput<typeof ClarityOptions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ export interface CloudflareWebAnalyticsApi {
}

declare global {
interface Window extends CloudflareWebAnalyticsApi {}
// Declared inline rather than via `extends`: an `extends` clause on the global `Window`
// surfaces as an unsuppressable TS2430 in consumer code when another package declares it (#852).
interface Window {
__cfBeacon: CloudflareWebAnalyticsApi['__cfBeacon']
}
}

export type CloudflareWebAnalyticsInput = RegistryScriptInput<typeof CloudflareWebAnalyticsOptions>
Expand Down
6 changes: 5 additions & 1 deletion packages/script/src/runtime/registry/google-adsense.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ export interface GoogleAdsenseApi {
}

declare global {
interface Window extends GoogleAdsenseApi {}
// Declared inline rather than via `extends`: an `extends` clause on the global `Window`
// surfaces as an unsuppressable TS2430 in consumer code when another package declares it (#852).
interface Window {
adsbygoogle: GoogleAdsenseApi['adsbygoogle']
}
}

/**
Expand Down
6 changes: 5 additions & 1 deletion packages/script/src/runtime/registry/google-recaptcha.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ export interface GoogleRecaptchaApi {
}

declare global {
interface Window extends GoogleRecaptchaApi {}
// Declared inline rather than via `extends`: an `extends` clause on the global `Window`
// surfaces as an unsuppressable TS2430 in consumer code when another package declares it (#852).
interface Window {
grecaptcha: GoogleRecaptchaApi['grecaptcha']
}
}

export function useScriptGoogleRecaptcha<T extends GoogleRecaptchaApi>(_options?: GoogleRecaptchaInput) {
Expand Down
6 changes: 5 additions & 1 deletion packages/script/src/runtime/registry/google-tag-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ export interface GoogleTagManagerApi {
* instead, which is also the only access path that respects a custom dataLayer name.
*/
declare global {
interface Window extends Pick<GoogleTagManagerApi, 'google_tag_manager'> {}
// Declared inline rather than via `extends`: an `extends` clause on the global `Window`
// surfaces as an unsuppressable TS2430 in consumer code when another package declares it (#852).
interface Window {
google_tag_manager: GoogleTagManagerApi['google_tag_manager']
}
}

export { GoogleTagManagerOptions }
Expand Down
5 changes: 4 additions & 1 deletion packages/script/src/runtime/registry/hotjar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ export interface HotjarApi {
}

declare global {
interface Window extends HotjarApi {
// Declared inline rather than via `extends`: an `extends` clause on the global `Window`
// surfaces as an unsuppressable TS2430 in consumer code when another package declares it (#852).
interface Window {
hj: HotjarApi['hj']
_hjSettings: { hjid: number, hjsv?: number }
}
}
Expand Down
5 changes: 4 additions & 1 deletion packages/script/src/runtime/registry/intercom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ export interface IntercomApi {
}

declare global {
interface Window extends IntercomApi {
// Declared inline rather than via `extends`: an `extends` clause on the global `Window`
// surfaces as an unsuppressable TS2430 in consumer code when another package declares it (#852).
interface Window {
Intercom: IntercomApi['Intercom']
intercomSettings?: any
}
}
Expand Down
5 changes: 4 additions & 1 deletion packages/script/src/runtime/registry/linkedin-insight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ export interface LinkedInInsightApi {
}

declare global {
interface Window extends LinkedInInsightApi {
// Declared inline rather than via `extends`: an `extends` clause on the global `Window`
// surfaces as an unsuppressable TS2430 in consumer code when another package declares it (#852).
interface Window {
lintrk: LinkedInInsightApi['lintrk']
_linkedin_partner_id?: string
_linkedin_data_partner_ids?: string[]
_linkedin_event_id?: string
Expand Down
6 changes: 5 additions & 1 deletion packages/script/src/runtime/registry/matomo-analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ export interface MatomoAnalyticsApi {
}

declare global {
interface Window extends MatomoAnalyticsApi { }
// Declared inline rather than via `extends`: an `extends` clause on the global `Window`
// surfaces as an unsuppressable TS2430 in consumer code when another package declares it (#852).
interface Window {
_paq: MatomoAnalyticsApi['_paq']
}
}

export interface MatomoConsent {
Expand Down
8 changes: 7 additions & 1 deletion packages/script/src/runtime/registry/meta-pixel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ export interface MetaPixelApi {
}

declare global {
interface Window extends MetaPixelApi {}
// Declared inline rather than via `extends`: an `extends` clause on the global `Window`
// surfaces as an unsuppressable TS2430 in consumer code when another package declares it (#852).
interface Window {
fbq: MetaPixelApi['fbq']
_fbq: MetaPixelApi['_fbq']
callMethod?: MetaPixelApi['callMethod']
}
}

export { MetaPixelOptions }
Expand Down
5 changes: 4 additions & 1 deletion packages/script/src/runtime/registry/paypal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ export interface PayPalApi {
}

declare global {
interface Window extends PayPalApi {
// Declared inline rather than via `extends`: an `extends` clause on the global `Window`
// surfaces as an unsuppressable TS2430 in consumer code when another package declares it (#852).
interface Window {
paypal: PayPalApi['paypal']
}
}

Expand Down
6 changes: 5 additions & 1 deletion packages/script/src/runtime/registry/reddit-pixel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ export interface RedditPixelApi {
}

declare global {
interface Window extends RedditPixelApi {}
// Declared inline rather than via `extends`: an `extends` clause on the global `Window`
// surfaces as an unsuppressable TS2430 in consumer code when another package declares it (#852).
interface Window {
rdt: RedditPixelApi['rdt']
}
}

export { RedditPixelOptions }
Expand Down
11 changes: 10 additions & 1 deletion packages/script/src/runtime/registry/segment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,16 @@ interface AnalyticsApi {
export type SegmentApi = Pick<AnalyticsApi, 'track' | 'page' | 'identify' | 'group' | 'alias' | 'reset'>

declare global {
interface Window extends SegmentApi {}
// Declared inline rather than via `extends`: an `extends` clause on the global `Window`
// surfaces as an unsuppressable TS2430 in consumer code when another package declares it (#852).
interface Window {
track: SegmentApi['track']
page: SegmentApi['page']
identify: SegmentApi['identify']
group: SegmentApi['group']
alias: SegmentApi['alias']
reset: SegmentApi['reset']
}
}

const methods = ['track', 'page', 'identify', 'group', 'alias', 'reset']
Expand Down
8 changes: 7 additions & 1 deletion packages/script/src/runtime/registry/snapchat-pixel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ export interface SnapPixelApi {
}

declare global {
interface Window extends SnapPixelApi {}
// Declared inline rather than via `extends`: an `extends` clause on the global `Window`
// surfaces as an unsuppressable TS2430 in consumer code when another package declares it (#852).
interface Window {
snaptr: SnapPixelApi['snaptr']
_snaptr: SnapPixelApi['_snaptr']
handleRequest?: SnapPixelApi['handleRequest']
}
}
export type SnapTrPixelInput = RegistryScriptInput<typeof SnapTrPixelOptions, true, false>

Expand Down
6 changes: 5 additions & 1 deletion packages/script/src/runtime/registry/vimeo-player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ export interface VimeoPlayerApi {
export type VimeoPlayerInput = RegistryScriptInput

declare global {
interface Window extends VimeoPlayerApi {}
// Declared inline rather than via `extends`: an `extends` clause on the global `Window`
// surfaces as an unsuppressable TS2430 in consumer code when another package declares it (#852).
interface Window {
Vimeo: VimeoPlayerApi['Vimeo']
}
}

export function useScriptVimeoPlayer<T extends VimeoPlayerApi>(_options?: VimeoPlayerInput): UseScriptContext<T> {
Expand Down
6 changes: 5 additions & 1 deletion packages/script/src/runtime/registry/x-pixel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ export interface XPixelApi {
}

declare global {
interface Window extends XPixelApi {}
// Declared inline rather than via `extends`: an `extends` clause on the global `Window`
// surfaces as an unsuppressable TS2430 in consumer code when another package declares it (#852).
interface Window {
twq: XPixelApi['twq']
}
}

export { XPixelOptions }
Expand Down
7 changes: 5 additions & 2 deletions packages/script/src/runtime/registry/youtube-player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ export interface YouTubePlayerApi {
}

declare global {
interface Window extends YouTubePlayerApi {
onYouTubeIframeAPIReady: () => void
// Declared inline rather than via `extends`: an `extends` clause on the global `Window`
// surfaces as an unsuppressable TS2430 in consumer code when another package declares it (#852).
interface Window {
YT: YouTubePlayerApi['YT']
onYouTubeIframeAPIReady?: () => void
}
}

Expand Down
Loading
Loading