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

Add typescript support #67

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Conversation

BobCashStory
Copy link

No description provided.

@syffs
Copy link

syffs commented Dec 9, 2020

@boblauer Your last commit on master was in Jan 2019, and this is the 3th opened PR (see also #60 #63 ) about typescript defs

Hence, could you please either review and merge those or give maintainer to whoever wants to do it ?

cheers

@syffs
Copy link

syffs commented Dec 10, 2020

@BobCashStory FYI, here are latest typescript defs required with mongoose>5.11 which now includes its own defs (@types/mongoose is no longer needed):

declare module 'mongoose' {
    interface Query<ResultType, DocType extends Document>  {
        // cache(ttl?: number, customKey?: string): DocumentQuery<DocType | null, DocType> & QueryHelpers
        cache(ttl?: number, customKey?: string): this
    }
    interface Aggregate<R> {
        cache(ttl?: number, customKey?: string): this
    }
}

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

Successfully merging this pull request may close these issues.

None yet

4 participants