UNPKG

@actyx/sdk

Version:
44 lines (43 loc) 1.38 kB
import * as t from 'io-ts'; export declare const SubscriptionIO: t.ReadonlyC<t.TypeC<{ semantics: t.StringC; name: t.StringC; sourceId: t.StringC; }>>; export declare const Subscription: { toString: (subscription: Subscription) => string; }; export declare type Subscription = t.TypeOf<typeof SubscriptionIO>; export declare const TagSubscription: t.ReadonlyC<t.TypeC<{ tags: t.ReadonlyArrayC<t.StringC>; local: t.BooleanC; }>>; export declare type TagSubscription = t.TypeOf<typeof TagSubscription>; /** * A set of subscriptions */ export declare const SubscriptionSetIO: t.TaggedUnionC<"type", [t.TypeC<{ type: t.LiteralC<"empty">; }>, t.TypeC<{ type: t.LiteralC<"all">; }>, t.TypeC<{ type: t.LiteralC<"or">; subscriptions: t.ReadonlyArrayC<t.ReadonlyC<t.TypeC<{ semantics: t.StringC; name: t.StringC; sourceId: t.StringC; }>>>; }>, t.TypeC<{ type: t.LiteralC<"tags">; subscriptions: t.ReadonlyArrayC<t.ReadonlyC<t.TypeC<{ tags: t.ReadonlyArrayC<t.StringC>; local: t.BooleanC; }>>>; }>]>; export declare type SubscriptionSet = t.TypeOf<typeof SubscriptionSetIO>; export declare type SubscriptionSetCompanion = { empty: SubscriptionSet; all: SubscriptionSet; or: (s: Subscription[]) => SubscriptionSet; }; export declare const SubscriptionSet: SubscriptionSetCompanion;