node-json-db
    Preparing search index...

    Interface IFileAdapter<T>

    Use to read and write data of type T

    interface IFileAdapter<T> {
        filename: string;
        readAsync: () => Promise<T | null>;
        writeAsync: (data: T) => Promise<void>;
    }

    Type Parameters

    • T

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    filename: string

    Name of the file used by the file adapter

    readAsync: () => Promise<T | null>

    Read the data from the medium

    writeAsync: (data: T) => Promise<void>

    Write date into the medium