@easbot/utils 0.2.34 → 0.2.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -759,6 +759,12 @@ declare namespace Fetch {
759
759
  filename?: string;
760
760
  }
761
761
  function postForm<T = any>(url: string | URL, fields: FormField[], options?: RequestOptions): Promise<FetchResponse<T>>;
762
+ interface SSEHandler {
763
+ onMessage?: (data: string) => void;
764
+ onError?: (error: Error) => void;
765
+ onComplete?: () => void;
766
+ }
767
+ function sse(url: string | URL, handler: SSEHandler, options?: RequestOptions): () => void;
762
768
  }
763
769
 
764
770
  declare namespace Slug {
package/dist/index.d.ts CHANGED
@@ -759,6 +759,12 @@ declare namespace Fetch {
759
759
  filename?: string;
760
760
  }
761
761
  function postForm<T = any>(url: string | URL, fields: FormField[], options?: RequestOptions): Promise<FetchResponse<T>>;
762
+ interface SSEHandler {
763
+ onMessage?: (data: string) => void;
764
+ onError?: (error: Error) => void;
765
+ onComplete?: () => void;
766
+ }
767
+ function sse(url: string | URL, handler: SSEHandler, options?: RequestOptions): () => void;
762
768
  }
763
769
 
764
770
  declare namespace Slug {