cachegoose
cachegoose copied to clipboard
Add typescript support
@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
@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
}
}