import { EventEmitter_, EventEmitter_EE } from './EventEmitter';
import { PI } from './types/interface/PI';
import { V } from './types/interface/V';
export type PinEvent = '_data' | 'data' | 'drop' | 'invalid' | 'start' | 'end' | 'constant' | 'ignored';
export type Pin_EE<T> = {
    _data: [T];
    data: [T];
    pull: [];
    drop: [T];
    start: [];
    end: [];
    invalid: [];
    ref: [boolean];
    ignored: [boolean];
    constant: [boolean];
};
export type Pin_M<T = any> = {
    _register: T | undefined;
    _invalid: boolean;
    _constant: boolean;
    _ignored: boolean;
    _idle: boolean;
};
export type PinEvents<T> = EventEmitter_EE<Pin_EE<T>> & Pin_EE<T>;
export type PinConstructor = {
    data?: any;
    constant?: boolean;
    ignored?: boolean;
    ref?: boolean;
};
export declare class Pin<T = any> extends EventEmitter_<PinEvents<T>> implements V<T>, PI<T> {
    private _constant;
    private _ignored;
    private _ref;
    private _invalid;
    private _idle;
    private _register;
    constructor({ data, constant, ignored, ref }?: PinConstructor);
    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): boolean;
    ref(value?: 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>;
}
