import { EventEmitter, EventEmitter_EE } from './EventEmitter';
import { V } from './types/interface/V';
export declare type PinEvent = 'data' | 'drop' | 'invalid' | 'start' | 'end' | 'constant' | 'ignored';
export declare type Pin_EE<T> = {
    data: [T];
    pull: [];
    drop: [T];
    start: [];
    end: [];
    invalid: [];
    ignored: [boolean];
    constant: [boolean];
};
export declare type Pin_M<T = any> = {
    _register: T | undefined;
    _invalid: boolean;
    _constant: boolean;
    _ignored: boolean;
    _idle: boolean;
};
export declare type PinEvents<T> = EventEmitter_EE<Pin_EE<T>> & Pin_EE<T>;
export declare class Pin<T = any> extends EventEmitter<PinEvents<T>> implements V<T> {
    private _constant;
    private _ignored;
    private _invalid;
    private _idle;
    private _register;
    constructor({ data, constant, ignored, }?: {
        data?: any;
        constant?: boolean;
        ignored?: boolean;
    });
    take(): T | undefined;
    invalidate(): void;
    start(): void;
    end(): void;
    pull(): T | undefined;
    push(data: T): void;
    peak(): T | undefined;
    empty(): boolean;
    active(): boolean;
    ignored(value?: boolean, take?: boolean): boolean;
    constant(value?: boolean): boolean;
    invalid(): boolean;
    snapshot(): Pin_M<T>;
    restore(state: Pin_M<T>): void;
    read(): Promise<any>;
    write(data: any): Promise<void>;
}
