Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript Support #148

Open
harshlodhi82 opened this issue Dec 19, 2020 · 2 comments
Open

TypeScript Support #148

harshlodhi82 opened this issue Dec 19, 2020 · 2 comments

Comments

@harshlodhi82
Copy link

Hi,
I need to use this package with the TypeScript based node/express application but I think it doesn't support it yet, Please kindly give the support for the TypeScript.
Thanks

@Fohlen
Copy link
Contributor

Fohlen commented Dec 20, 2020

@harshlodhi82 in the meantime you can build it yourself, e.g:

declare module 'google-trends-api' {
    export interface TrendOptions {
        keyword: string | string[],
        startTime?: Date,
        endTime?: Date,
        geo?: string | string[],
        hl?: string,
        timezone?: number,
        category?: number,
        property?: string,
        granularTimeResolution?: boolean
    }

    interface InterestOverTimeResult {
        "default": {
            "timelineData": [{
                "time": string,
                "formattedTime": string,
                "formattedAxisTime": string,
                "value": number[],
                "formattedValue": string[]
            }]
        }
    }

    export function interestOverTime(options: any): Promise<InterestOverTimeResult>;
}

@harshlodhi82
Copy link
Author

Thanks for the Help @Fohlen 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants