isaacscript-common 77.2.0 → 77.2.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.
@@ -1,5 +1,9 @@
1
1
  import { BossID, EntityType } from "isaac-typescript-definitions";
2
2
  declare const STORY_BOSS_IDS: readonly [BossID.MOM, BossID.MOMS_HEART, BossID.SATAN, BossID.IT_LIVES, BossID.ISAAC, BossID.BLUE_BABY, BossID.LAMB, BossID.MEGA_SATAN, BossID.ULTRA_GREED, BossID.HUSH, BossID.DELIRIUM, BossID.ULTRA_GREEDIER, BossID.MOTHER, BossID.MAUSOLEUM_MOM, BossID.MAUSOLEUM_MOMS_HEART, BossID.DOGMA, BossID.BEAST];
3
+ /**
4
+ * A helper type that is a union of every story boss. Useful for data structures that must contain
5
+ * one entry for each story boss.
6
+ */
3
7
  export type StoryBossID = (typeof STORY_BOSS_IDS)[number];
4
8
  /**
5
9
  * Helper function to determine if the specified entity type is an end-game story boss, like Isaac,
@@ -12,6 +16,6 @@ export declare function isStoryBoss(entityType: EntityType): boolean;
12
16
  * Baby, Mega Satan, The Beast, and so on. This is useful because certain effects should only apply
13
17
  * to non-story bosses, like Vanishing Twin.
14
18
  */
15
- export declare function isStoryBossID(bossID: BossID): boolean;
19
+ export declare function isStoryBossID(bossID: BossID): bossID is StoryBossID;
16
20
  export {};
17
21
  //# sourceMappingURL=storyBosses.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"storyBosses.d.ts","sourceRoot":"","sources":["../../src/functions/storyBosses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAGlE,QAAA,MAAM,cAAc,gTAkBV,CAAC;AAyBX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAE3D;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAErD"}
1
+ {"version":3,"file":"storyBosses.d.ts","sourceRoot":"","sources":["../../src/functions/storyBosses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAGlE,QAAA,MAAM,cAAc,gTAkBV,CAAC;AAyBX;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAE3D;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,WAAW,CAEnE"}
@@ -10136,7 +10136,7 @@ export declare function isStoryBoss(entityType: EntityType): boolean;
10136
10136
  * Baby, Mega Satan, The Beast, and so on. This is useful because certain effects should only apply
10137
10137
  * to non-story bosses, like Vanishing Twin.
10138
10138
  */
10139
- export declare function isStoryBossID(bossID: BossID): boolean;
10139
+ export declare function isStoryBossID(bossID: BossID): bossID is StoryBossID;
10140
10140
 
10141
10141
  export declare function isString(variable: unknown): variable is string;
10142
10142
 
@@ -18633,6 +18633,10 @@ export declare function stopAllSoundEffects(soundEffectCustom?: TranspiledEnum):
18633
18633
 
18634
18634
  declare const STORY_BOSS_IDS: readonly [BossID.MOM, BossID.MOMS_HEART, BossID.SATAN, BossID.IT_LIVES, BossID.ISAAC, BossID.BLUE_BABY, BossID.LAMB, BossID.MEGA_SATAN, BossID.ULTRA_GREED, BossID.HUSH, BossID.DELIRIUM, BossID.ULTRA_GREEDIER, BossID.MOTHER, BossID.MAUSOLEUM_MOM, BossID.MAUSOLEUM_MOMS_HEART, BossID.DOGMA, BossID.BEAST];
18635
18635
 
18636
+ /**
18637
+ * A helper type that is a union of every story boss. Useful for data structures that must contain
18638
+ * one entry for each story boss.
18639
+ */
18636
18640
  export declare type StoryBossID = (typeof STORY_BOSS_IDS)[number];
18637
18641
 
18638
18642
  /** From: https://gist.github.com/ryandabler/8b4ff4f36aed47bc09acc03174638468 */
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 77.1.0
3
+ isaacscript-common 77.2.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "77.2.0",
3
+ "version": "77.2.1",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -44,6 +44,10 @@ const STORY_BOSS_ENTITY_TYPES_SET = new ReadonlySet([
44
44
 
45
45
  const STORY_BOSS_IDS_SET = new ReadonlySet<BossID>(STORY_BOSS_IDS);
46
46
 
47
+ /**
48
+ * A helper type that is a union of every story boss. Useful for data structures that must contain
49
+ * one entry for each story boss.
50
+ */
47
51
  export type StoryBossID = (typeof STORY_BOSS_IDS)[number];
48
52
 
49
53
  /**
@@ -60,6 +64,6 @@ export function isStoryBoss(entityType: EntityType): boolean {
60
64
  * Baby, Mega Satan, The Beast, and so on. This is useful because certain effects should only apply
61
65
  * to non-story bosses, like Vanishing Twin.
62
66
  */
63
- export function isStoryBossID(bossID: BossID): boolean {
67
+ export function isStoryBossID(bossID: BossID): bossID is StoryBossID {
64
68
  return STORY_BOSS_IDS_SET.has(bossID);
65
69
  }