denotify-client 1.1.13 → 1.1.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -300,8 +300,8 @@ export declare class AlertBuilder {
300
300
  * @param options Desired trigger configuration
301
301
  * @returns self for piping
302
302
  */
303
- withTrigger<T>(id: TriggerTypeId, options: T): AlertBuilder;
304
- withNotification<T = NotificationConfig>(id: NotificationTypeId, options: T): AlertBuilder;
303
+ withTrigger<TTriggerTypeId extends TriggerTypeId>(id: TTriggerTypeId, options: TTriggerTypeId extends "PollFunctionV2" ? PollFunctionV2 : TTriggerTypeId extends "OnchainEventV1" ? OnchainEventV1 : TTriggerTypeId extends "PollFunctionV1" ? PollFunctionV1 : never): AlertBuilder;
304
+ withNotification<TNotificationTypeId extends NotificationTypeId>(id: TNotificationTypeId, options: TNotificationTypeId extends "Discord" ? DiscordWebhook : never): AlertBuilder;
305
305
  validate(): Promise<{
306
306
  username?: string | undefined;
307
307
  avatar_url?: string | undefined;