diff --git a/src/chip.ts b/src/chip.ts index cd83621..22cb16c 100644 --- a/src/chip.ts +++ b/src/chip.ts @@ -85,6 +85,9 @@ export interface IEventListener { subscriptionHandler: SubscriptionHandler; } +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export type SignalParams = Record; + /** * A `Signal` represents a immutable message that is provided to a chip when it activates, * as well as when it terminates. @@ -95,11 +98,13 @@ export interface IEventListener { */ export interface Signal { readonly name: string; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - readonly params: Record; + readonly params: SignalParams; } -export function makeSignal(name = "default", params = {}): Signal { +export function makeSignal( + name = "default", + params: SignalParams = {} +): Signal { return { name, params }; }