@iotize/tap
Version:
IoTize Device client for Javascript
15 lines (14 loc) • 500 B
TypeScript
import { Predicate } from './definitions';
export declare class MockRouter<InputType = any, OutputType = any> {
_routes: {
predicate: Predicate<InputType>;
adapter: (input: InputType) => OutputType;
}[];
get routes(): {
predicate: Predicate<InputType>;
adapter: (input: InputType) => OutputType;
}[];
findRoute(request: InputType): any;
addRoute<T>(predicate: Predicate<InputType>, adapter: any): this;
clearRoutes(): this;
}