@discordjs/core 1.1.2-dev.1702253374-651ffc2ca → 1.1.2-dev.1702598985-18c2dccd0

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.mts CHANGED
@@ -1806,9 +1806,8 @@ interface MappedEvents {
1806
1806
  [GatewayDispatchEvents.VoiceStateUpdate]: [WithIntrinsicProps<GatewayVoiceStateUpdateDispatchData>];
1807
1807
  [GatewayDispatchEvents.WebhooksUpdate]: [WithIntrinsicProps<GatewayWebhooksUpdateDispatchData>];
1808
1808
  }
1809
- type ManagerShardEventsMap = {
1810
- [K in keyof MappedEvents]: MappedEvents[K];
1811
- };
1809
+ interface ManagerShardEventsMap extends MappedEvents {
1810
+ }
1812
1811
  interface ClientOptions {
1813
1812
  gateway: Gateway;
1814
1813
  rest: REST;
@@ -1819,7 +1818,7 @@ interface RequestGuildMembersResult {
1819
1818
  notFound: NonNullable<GatewayGuildMembersChunkDispatchData['not_found']>;
1820
1819
  presences: NonNullable<GatewayGuildMembersChunkDispatchData['presences']>;
1821
1820
  }
1822
- declare class Client extends AsyncEventEmitter<ManagerShardEventsMap> {
1821
+ declare class Client extends AsyncEventEmitter<MappedEvents> {
1823
1822
  readonly rest: REST;
1824
1823
  readonly gateway: Gateway;
1825
1824
  readonly api: API;
package/dist/index.d.ts CHANGED
@@ -1806,9 +1806,8 @@ interface MappedEvents {
1806
1806
  [GatewayDispatchEvents.VoiceStateUpdate]: [WithIntrinsicProps<GatewayVoiceStateUpdateDispatchData>];
1807
1807
  [GatewayDispatchEvents.WebhooksUpdate]: [WithIntrinsicProps<GatewayWebhooksUpdateDispatchData>];
1808
1808
  }
1809
- type ManagerShardEventsMap = {
1810
- [K in keyof MappedEvents]: MappedEvents[K];
1811
- };
1809
+ interface ManagerShardEventsMap extends MappedEvents {
1810
+ }
1812
1811
  interface ClientOptions {
1813
1812
  gateway: Gateway;
1814
1813
  rest: REST;
@@ -1819,7 +1818,7 @@ interface RequestGuildMembersResult {
1819
1818
  notFound: NonNullable<GatewayGuildMembersChunkDispatchData['not_found']>;
1820
1819
  presences: NonNullable<GatewayGuildMembersChunkDispatchData['presences']>;
1821
1820
  }
1822
- declare class Client extends AsyncEventEmitter<ManagerShardEventsMap> {
1821
+ declare class Client extends AsyncEventEmitter<MappedEvents> {
1823
1822
  readonly rest: REST;
1824
1823
  readonly gateway: Gateway;
1825
1824
  readonly api: API;
package/dist/index.js CHANGED
@@ -2563,7 +2563,12 @@ var Client = class extends import_async_event_emitter.AsyncEventEmitter {
2563
2563
  this.gateway = gateway;
2564
2564
  this.api = new API(rest);
2565
2565
  this.gateway.on(import_ws.WebSocketShardEvents.Dispatch, ({ data: dispatch, shardId }) => {
2566
- this.emit(dispatch.t, this.wrapIntrinsicProps(dispatch.d, shardId));
2566
+ this.emit(
2567
+ // TODO: move this expect-error down to the next line once entitlements get merged, so missing dispatch types result in errors
2568
+ // @ts-expect-error event props can't be resolved properly, but they are correct
2569
+ dispatch.t,
2570
+ this.wrapIntrinsicProps(dispatch.d, shardId)
2571
+ );
2567
2572
  });
2568
2573
  }
2569
2574
  /**
@@ -2709,7 +2714,7 @@ __name(withFiles, "withFiles");
2709
2714
 
2710
2715
  // src/index.ts
2711
2716
  __reExport(src_exports, require("discord-api-types/v10"), module.exports);
2712
- var version = "1.1.2-dev.1702253374-651ffc2ca";
2717
+ var version = "1.1.2-dev.1702598985-18c2dccd0";
2713
2718
  // Annotate the CommonJS export names for ESM import in node:
2714
2719
  0 && (module.exports = {
2715
2720
  API,