Use to read and write data of type T

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

Type Parameters

  • T

Hierarchy (View Summary)

Implemented by

Properties

filename: string

Name of the file used by the file adapter

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

Read the data from the medium

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

Write date into the medium