cachegoose icon indicating copy to clipboard operation
cachegoose copied to clipboard

Add typescript support

Open BobCashStory opened this issue 5 years ago • 2 comments

BobCashStory avatar Nov 24 '20 12:11 BobCashStory

@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 avatar Dec 09 '20 10:12 syffs

@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
    }
}

syffs avatar Dec 10 '20 14:12 syffs