UNPKG

@athenna/database

Version:

The Athenna database handler for SQL/NoSQL.

33 lines (32 loc) 886 B
/** * @athenna/database * * (c) João Lenon <lenon@athenna.io> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ export declare class ObjectId { /** * Validate if is a valid object id. */ static isValid(objectId: any): boolean; /** * Validate if is a valid object id string or ObjectID object. */ static isValidStringOrObject(objectId: any): boolean; /** * Validate if is a valid object id string. */ static isValidString(objectId: any): boolean; /** * Swap the value for an objectId instance if valid. * If not valid, return the value. */ static ifValidSwap(value: any): any; /** * Validate if is a valid object id object. */ static isValidObject(objectId: any): boolean; constructor(value: any); }