UNPKG

@mathrunet/masamune

Version:

Manages packages for the server portion (NodeJS) of the Masamune framework.

67 lines (66 loc) 1.84 kB
import { FirestoreModelFieldValueConverter, ModelFieldValueConverter } from "../model_field_value_converter"; import { Timestamp } from "firebase-admin/firestore"; /** * ModelTimestamp ModelFieldValueConverter. * * ModelTimestamp用のModelFieldValueConverter。 */ export declare class ModelTimestampConverter extends ModelFieldValueConverter { /** * ModelTimestamp ModelFieldValueConverter. * * ModelTimestamp用のModelFieldValueConverter。 */ constructor(); type: string; convertFrom(key: string, value: any, original: { [field: string]: any; }): { [field: string]: any; } | null; convertTo(key: string, value: any, original: { [field: string]: any; }): { [field: string]: any; } | null; } /** * Create Timestamp from microseconds. * * マイクロ秒からTimestampを作成します。 * * @param microseconds * Microseconds. * * マイクロ秒。 * * @returns {Timestamp} * Timestamp. * * Timestamp。 */ export declare function createTimestampFromMicroseconds(microseconds: number): Timestamp; /** * FirestoreConverter for [ModelTimestamp]. * * [ModelTimestamp]用のFirestoreConverter。 */ export declare class FirestoreModelTimestampConverter extends FirestoreModelFieldValueConverter { /** * FirestoreConverter for [ModelTimestamp]. * * [ModelTimestamp]用のFirestoreConverter。 */ constructor(); type: string; convertFrom(key: string, value: any, original: { [field: string]: any; }, firestoreInstance: FirebaseFirestore.Firestore): { [field: string]: any; } | null; convertTo(key: string, value: any, _original: { [field: string]: any; }, firestoreInstance: FirebaseFirestore.Firestore): { [field: string]: any; } | null; }