Skip to content

Commit

Permalink
Remove window declarations from pure types (#560)
Browse files Browse the repository at this point in the history
  • Loading branch information
fruchtose-stripe committed Feb 21, 2024
1 parent f8997c2 commit 44393f6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
7 changes: 2 additions & 5 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
export * from './api';
export * from './stripe-js';

import {StripeConstructor, StripeConstructorOptions, Stripe} from './stripe-js';
import {StripeConstructor} from './stripe-js';

export const loadStripe: (
publishableKey: string,
options?: StripeConstructorOptions | undefined
) => Promise<Stripe | null>;
export {loadStripe} from './shared';

declare global {
interface Window {
Expand Down
2 changes: 1 addition & 1 deletion types/pure.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {loadStripe as _loadStripe} from './index';
import {loadStripe as _loadStripe} from './shared';

export const loadStripe: typeof _loadStripe & {
setLoadParameters: (params: {advancedFraudSignals: boolean}) => void;
Expand Down
6 changes: 6 additions & 0 deletions types/shared.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import {StripeConstructorOptions, Stripe} from './stripe-js';

export const loadStripe: (
publishableKey: string,
options?: StripeConstructorOptions | undefined
) => Promise<Stripe | null>;

0 comments on commit 44393f6

Please sign in to comment.