Skip to content
Open
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
16 changes: 4 additions & 12 deletions types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ declare module "extpay" {
interface Plan {
unitAmountCents: number
currency: string
nickname: String | null,
nickname: string | null,
interval: "month" | "year" | "once"
intervalCount: number | null
}

interface User {
/** user.paid is meant to be a simple way to tell if the user should have paid features activated.
* For subscription payments, paid is only true if subscriptionStatus is active. */
Expand Down Expand Up @@ -33,16 +34,7 @@ declare module "extpay" {
/** date that the user's subscription is set to cancel or did cancel at. */
subscriptionCancelAt?: Date | null
}

interface Plan {
unitAmountCents: number;
currency: string;
nickname: string | null;
interval: 'month' | 'year' | 'once';
intervalCount: number | null;
}



interface ExtPay {
getUser: () => Promise<User>
getPlans: () => Promise<Plan[]>
Expand All @@ -57,6 +49,6 @@ declare module "extpay" {
}
startBackground: () => void
}

export default function ExtPay(extensionId: string): ExtPay
}