@actyx/sdk
Version:
Actyx SDK
32 lines (31 loc) • 1.01 kB
TypeScript
import { Where } from './tags';
/** Anything that has tags. @alpha */
export declare type HasTags = {
tags: string[];
};
/**
* Turn a `Where` into a function that can decide whether a locally emitted event matches the clause.
*
* We can ignore the 'local' flag since it will never exclude our local events,
* and this method is used solely to decide whether locally emitted events are relevant.
*
* TODO: This will be removed once we support other means of 'I got events up to X' feedback
*
* @alpha
*/
export declare const toEventPredicate: (where: Where<unknown>) => (event: HasTags) => boolean;
/**
* Refinement that checks whether typeof x === 'string'
* @public
*/
export declare const isString: (x: any) => x is string;
/**
* Refinement that checks whether typeof x === 'number'
* @public
*/
export declare const isNumber: (x: any) => x is number;
/**
* Refinement that checks whether typeof x === 'number'
* @public
*/
export declare const isBoolean: (x: any) => x is boolean;