@tixyel/streamelements 6.3.0 → 6.4.1

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.ts CHANGED
@@ -2686,19 +2686,19 @@ declare namespace Helper {
2686
2686
  * @param obj - The object to get entries from.
2687
2687
  * @returns An array of key-value pairs from the object.
2688
2688
  */
2689
- function typedEntries<K extends string, V>(obj: Record<K, V>): [K, V][];
2689
+ function typedEntries<K extends string, V>(obj: Record<K, V> | Array<V>): [K, V][];
2690
2690
  /**
2691
2691
  * Returns typed values of an object.
2692
2692
  * @param obj - The object to get values from.
2693
2693
  * @returns An array of values from the object.
2694
2694
  */
2695
- function typedValues<K extends string, V>(obj: Record<K, V>): V[];
2695
+ function typedValues<K extends string, V>(obj: Record<K, V> | Array<V>): V[];
2696
2696
  /**
2697
2697
  * Returns typed keys of an object.
2698
2698
  * @param obj - The object to get keys from.
2699
2699
  * @returns An array of keys from the object.
2700
2700
  */
2701
- function typedKeys<K extends string, V>(obj: Record<K, V>): K[];
2701
+ function typedKeys<K extends string, V>(obj: Record<K, V> | Array<V>): K[];
2702
2702
  /**
2703
2703
  * Selects an item based on weighted probabilities.
2704
2704
  * @param items - An object where keys are items and values are their weights.
@@ -2709,7 +2709,7 @@ declare namespace Helper {
2709
2709
  }
2710
2710
 
2711
2711
  declare namespace Local {
2712
- type Queue = useQueue<{
2712
+ type QueueItem = {
2713
2713
  listener: 'onEventReceived';
2714
2714
  data: StreamElements.Event.onEventReceived;
2715
2715
  session?: boolean;
@@ -2719,9 +2719,9 @@ declare namespace Local {
2719
2719
  } | {
2720
2720
  listener: 'onSessionUpdate';
2721
2721
  data: StreamElements.Event.onSessionUpdate;
2722
- }>;
2723
- export var queue: Queue | undefined;
2724
- export const generate: {
2722
+ };
2723
+ const queue: useQueue<QueueItem>;
2724
+ const generate: {
2725
2725
  session: {
2726
2726
  types: Record<string, StreamElements.Session.Config.Any>;
2727
2727
  available(): StreamElements.Session.Config.Available.Data;
@@ -2760,7 +2760,7 @@ declare namespace Local {
2760
2760
  onEventReceived(provider?: Provider$1 | "random", type?: StreamElements.Event.onEventReceived["listener"] | "random" | "tip" | "cheer" | "follower" | "raid" | "subscriber", options?: Record<string, string | number | boolean>): Promise<StreamElements.Event.onEventReceived | null>;
2761
2761
  };
2762
2762
  };
2763
- export const emulate: {
2763
+ const emulate: {
2764
2764
  twitch: {
2765
2765
  message(data?: Partial<{
2766
2766
  name: string;
@@ -2845,8 +2845,7 @@ declare namespace Local {
2845
2845
  facebook: {};
2846
2846
  send<T extends "onEventReceived" | "onSessionUpdate" | "onWidgetLoad">(listener: T, event: T extends "onEventReceived" ? StreamElements.Event.onEventReceived : T extends "onSessionUpdate" ? StreamElements.Event.onSessionUpdate : StreamElements.Event.onWidgetLoad): void;
2847
2847
  };
2848
- export function start(fieldsFile?: string[], dataFiles?: string[], session?: StreamElements.Session.Data): Promise<void>;
2849
- export {};
2848
+ function start(fieldsFile?: string[], dataFiles?: string[], session?: StreamElements.Session.Data): Promise<void>;
2850
2849
  }
2851
2850
 
2852
2851
  declare namespace Data {
@@ -2974,7 +2973,7 @@ declare global {
2974
2973
  onEventReceived: CustomEvent<StreamElements.Event.onEventReceived>;
2975
2974
  }
2976
2975
  const Tixyel: typeof main;
2977
- let client: InstanceType<typeof main.Client>;
2976
+ let client: InstanceType<typeof main.Client> | undefined;
2978
2977
  const SE_API: StreamElements.SE_API;
2979
2978
  }
2980
2979