@usethrottle/checkout-react
    Preparing search index...

    Interface SecureFieldsInstance

    Everything this package uses off a SecureFields instance, declared structurally instead of re-exporting the SDK's own class type.

    @gr4vy/secure-fields's exports map has no types condition, so naming its type in an exported declaration makes tsup emit import { SecureFields } from '@gr4vy/secure-fields' into dist/index.d.ts — which is a hard TS7016 for any consumer on moduleResolution: bundler with skipLibCheck: false, and a silent degradation of instance to any with skipLibCheck: true (the Next default). That hits every installer of this package, not only Secure Fields users. The paths override in this package's tsconfig repairs our own compile; it is monorepo-only and does not ship. Same approach as ThreeDSecureInstance in threeDSecure.ts.

    Members use method syntax deliberately: TypeScript checks method parameters bivariantly, so the real class's narrower option and event types stay assignable to the looser ones declared here.

    interface SecureFieldsInstance {
        controller?: HTMLIFrameElement;
        addCardNumberField(
            element: string | HTMLElement,
            options?: Record<string, unknown>,
        ): unknown;
        addEventListener(event: string, callback: (...args: any[]) => void): void;
        addExpiryDateField(
            element: string | HTMLElement,
            options?: Record<string, unknown>,
        ): unknown;
        addField(
            element: string | HTMLElement,
            options: Record<string, unknown>,
        ): unknown;
        addSecurityCodeField(
            element: string | HTMLElement,
            options?: Record<string, unknown>,
        ): unknown;
        addThreeDSecure(
            element: string | HTMLElement,
            options?: { challengeWindowSize?: "01" | "02" | "03" | "04" | "05" },
        ): void;
        removeEventListener?(
            event: string,
            callback: (...args: any[]) => void,
        ): void;
        submit(): void;
    }
    Index
    controller?: HTMLIFrameElement

    Gr4vy's hidden controller iframe, removed when the provider unmounts.

    • Parameters

      • element: string | HTMLElement
      • Optionaloptions: Record<string, unknown>

      Returns unknown

    • Parameters

      • event: string
      • callback: (...args: any[]) => void

      Returns void

    • Parameters

      • element: string | HTMLElement
      • Optionaloptions: Record<string, unknown>

      Returns unknown

    • Parameters

      • element: string | HTMLElement
      • options: Record<string, unknown>

      Returns unknown

    • Parameters

      • element: string | HTMLElement
      • Optionaloptions: Record<string, unknown>

      Returns unknown

    • Parameters

      • element: string | HTMLElement
      • Optionaloptions: { challengeWindowSize?: "01" | "02" | "03" | "04" | "05" }

      Returns void

    • Parameters

      • event: string
      • callback: (...args: any[]) => void

      Returns void