ladeiko / node-apple-receipt-verify

A Node.js module for In-App-Purchase receipt validation for iOS.
MIT License
92 stars 25 forks source link

Options typescript interface issue - secret should be optional #36

Closed JoHuang closed 8 months ago

JoHuang commented 2 years ago

currently

export interface ConfigOptions {
    secret: string;
    verbose?: boolean | undefined;
    environment?: string[] | undefined;
    ignoreExpiredError?: boolean | undefined;
    ignoreExpired?: boolean | undefined;
    extended?: boolean | undefined;
    excludeOldTransactions?: boolean | undefined;
}

should be

export interface ConfigOptions {
    secret?: string;
    verbose?: boolean | undefined;
    environment?: string[] | undefined;
    ignoreExpiredError?: boolean | undefined;
    ignoreExpired?: boolean | undefined;
    extended?: boolean | undefined;
    excludeOldTransactions?: boolean | undefined;
}

Have to use any to workaround if you don't check auto-renewable purchases.

ladeiko commented 8 months ago

Library does not provide typescript definition