md-curcuma
Version:
A Typescript library for transporting and converting markdown and other data.
44 lines (43 loc) • 1.62 kB
TypeScript
import { Observable, Observer_Interface, Observer_Props, Observer_Type } from "../core/observer";
import { Data_Interface, IO_Observable_Reader_Interface, IO_Observable_Writer_Interface } from "./types";
export interface Json_IO_ReadProps_Interface {
path: string;
simulate: boolean;
doSubfolders: boolean;
limit: number;
useCounter: boolean;
}
export interface Json_IO_WriteProps_Interface {
path: string;
simulate: boolean;
doSubfolders: boolean;
append: boolean;
limit: number;
useCounter: boolean;
}
export declare class Json_IO_Reader<D> implements IO_Observable_Reader_Interface<D>, Observable<D> {
private observer_subject;
private props;
constructor(props: Json_IO_ReadProps_Interface);
add_observer(observer: Observer_Interface<D>, id: Observer_Type): void;
notify_all(props: Observer_Props<D>): void;
notify(props: Observer_Props<D>): void;
read(): void;
}
export declare class Json_IO_Writer<D> implements IO_Observable_Writer_Interface<D>, Observable<D> {
private observer_subject;
private props;
private collected_data;
constructor(props: Json_IO_WriteProps_Interface);
add_observer(observer: Observer_Interface<D>, id: Observer_Type): void;
notify_all(props: Observer_Props<D>): void;
notify(props: Observer_Props<D>): void;
write(dao: Data_Interface<D>): void;
}
export declare class Json_IO<D> {
private reader;
private writer;
constructor(read_props: Json_IO_ReadProps_Interface, write_props: Json_IO_WriteProps_Interface);
read(): void;
write(dao: Data_Interface<D>): void;
}