UNPKG

scandit-web-datacapture-core

Version:

Scandit Data Capture SDK for the Web

12 lines (10 loc) 481 B
/// <reference types="emscripten" /> type Predicate<TInput> = (v: TInput) => boolean; type Handler<TInput, TOutput> = (v: TInput) => TOutput; interface Match<Input, Output> { when: (predicate: Predicate<Input>, handler: Handler<Input, Output>) => this; run: () => Output; otherwise: (handler: Handler<Input, Output>) => this; } declare function match<TInput, TOutput>(value: TInput): Match<TInput, TOutput>; export { type Handler, type Match, type Predicate, match };