Merge pull request #28003 from overleaf/rh-b2c-js-ts

Migrate B2C js to typescript: contact form, form helpers, and algolia

GitOrigin-RevId: b9ec423cdc551123a5b471e4a4c1a482b6a02e16
This commit is contained in:
roo hutton
2025-08-29 08:06:21 +00:00
committed by Copybot
parent 467102fd1b
commit 4ec437db9e
14 changed files with 287 additions and 142 deletions
+11
View File
@@ -0,0 +1,11 @@
export interface ReCaptchaConfig {
callback: (token: string) => void
'error-callback'?: () => void
'expired-callback'?: () => void
}
export interface ReCaptchaInstance {
render: (element: HTMLElement | string, config: ReCaptchaConfig) => string
execute: (recaptchaId: string) => Promise<string>
reset: (recaptchaId?: string) => void
}
+2 -1
View File
@@ -1,6 +1,7 @@
import 'recurly__recurly-js'
import { ScopeValueStore } from './ide/scope-value-store'
import { MetaAttributesCache } from '@/utils/meta'
import { ReCaptchaInstance } from './recaptcha'
declare global {
// eslint-disable-next-line no-unused-vars
@@ -28,6 +29,6 @@ declare global {
propensity?: (propensityId?: string) => void
olLoadGA?: () => void
grecaptcha?: any
grecaptcha?: ReCaptchaInstance
}
}