UNPKG

1.73 kBTypeScriptView Raw
1/// <reference types="mongoose/types/aggregate" />
2/// <reference types="mongoose/types/callback" />
3/// <reference types="mongoose/types/collection" />
4/// <reference types="mongoose/types/connection" />
5/// <reference types="mongoose/types/cursor" />
6/// <reference types="mongoose/types/document" />
7/// <reference types="mongoose/types/error" />
8/// <reference types="mongoose/types/expressions" />
9/// <reference types="mongoose/types/helpers" />
10/// <reference types="mongoose/types/middlewares" />
11/// <reference types="mongoose/types/indexes" />
12/// <reference types="mongoose/types/models" />
13/// <reference types="mongoose/types/mongooseoptions" />
14/// <reference types="mongoose/types/pipelinestage" />
15/// <reference types="mongoose/types/populate" />
16/// <reference types="mongoose/types/query" />
17/// <reference types="mongoose/types/schemaoptions" />
18/// <reference types="mongoose/types/schematypes" />
19/// <reference types="mongoose/types/session" />
20/// <reference types="mongoose/types/types" />
21/// <reference types="mongoose/types/utility" />
22/// <reference types="mongoose/types/validation" />
23/// <reference types="mongoose/types/virtuals" />
24/// <reference types="mongoose/types/inferschematype" />
25/// <reference types="mongoose/types/inferrawdoctype" />
26import type { Types } from 'mongoose';
27import type { RefType } from './types';
28export declare abstract class TimeStamps {
29 createdAt?: Date;
30 updatedAt?: Date;
31}
32/**
33 * This Interface can be used when "_id" and "id" need to be defined in types
34 */
35export interface Base<IDType extends RefType = Types.ObjectId> {
36 _id: IDType;
37 /**
38 * This getter/setter doesn't exist if "schemaOptions.id" being set to "false"
39 */
40 id: string;
41}