/**
* Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { ISignal } from "./ISignal";
import { ISlot } from "./ISlot";
import { Slot } from "./Slot";
/**
* Allows the valueClasses to be set in MXML, e.g.
* {[String, uint]}
*/
/**
* A MonoSignal can have only one listener.
*/
export declare class MonoSignal implements ISignal {
protected _valueClasses: any[];
protected slot: Slot;
/**
* Creates a MonoSignal instance to dispatch value objects.
*
* @param valueClasses Any number of class references that enable type checks in dispatch().
* For example, new Signal(String, uint)
* would allow: signal.dispatch("the Answer", 42)
* but not: signal.dispatch(true, 42.5)
* nor: signal.dispatch()
*
* NOTE: Subclasses cannot call super.apply(null, valueClasses),
* but this constructor has logic to support super(valueClasses).
*/
constructor(...valueClasses: any[]);
/**
* @inheritDoc
* @throws ArgumentError ArgumentError: Invalid valueClasses argument: item at index should be a Class but was not.
*/
get valueClasses(): any[];
set valueClasses(value: any[]);
/** @inheritDoc */
get numListeners(): number;
/**
* @inheritDoc
* @throws flash.errors.IllegalOperationError IllegalOperationError: You cannot add or addOnce with a listener already added, remove the current listener first.
* @throws ArgumentError ArgumentError: Given listener is null.
*/
add(listener: Function): ISlot;
/**
* @inheritDoc
* @throws flash.errors.IllegalOperationError IllegalOperationError: You cannot add or addOnce with a listener already added, remove the current listener first.
* @throws ArgumentError ArgumentError: Given listener is null.
*/
addOnce(listener: Function): ISlot;
/** @inheritDoc */
remove(listener: Function): ISlot;
/** @inheritDoc */
removeAll(): void;
/**
* @inheritDoc
* @throws ArgumentError ArgumentError: Incorrect number of arguments.
* @throws ArgumentError ArgumentError: Value object is not an instance of the appropriate valueClasses Class.
*/
dispatch(...valueObjects: any[]): void;
protected registerListener(listener: Function, once?: boolean): ISlot;
}