isaacscript-common 21.5.1 → 21.5.3

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.
Files changed (33) hide show
  1. package/dist/index.rollup.d.ts +2 -3
  2. package/dist/isaacscript-common.lua +2 -2
  3. package/dist/src/callbacks.d.ts +1 -1
  4. package/dist/src/callbacks.d.ts.map +1 -1
  5. package/dist/src/classes/features/other/customStages/backdrop.d.ts.map +1 -1
  6. package/dist/src/core/upgradeMod.d.ts +0 -1
  7. package/dist/src/core/upgradeMod.d.ts.map +1 -1
  8. package/dist/src/core/upgradeMod.lua +0 -1
  9. package/dist/src/functions/modFeatures.d.ts +1 -1
  10. package/dist/src/functions/modFeatures.d.ts.map +1 -1
  11. package/dist/src/objects/LRoomShapeToRectangles.d.ts +1 -3
  12. package/dist/src/objects/LRoomShapeToRectangles.d.ts.map +1 -1
  13. package/dist/src/objects/englishLevelNames.d.ts +103 -3
  14. package/dist/src/objects/englishLevelNames.d.ts.map +1 -1
  15. package/dist/src/objects/isaacAPIClassTypeToFunctions.d.ts +40 -6
  16. package/dist/src/objects/isaacAPIClassTypeToFunctions.d.ts.map +1 -1
  17. package/dist/src/objects/roomShapeToDoorSlotsToGridIndexDelta.d.ts +1 -3
  18. package/dist/src/objects/roomShapeToDoorSlotsToGridIndexDelta.d.ts.map +1 -1
  19. package/dist/src/types/private/CallbackTuple.d.ts +8 -8
  20. package/dist/src/types/private/CallbackTuple.d.ts.map +1 -1
  21. package/dist/src/types/private/ModUpgradedWithFeatures.d.ts +1 -1
  22. package/dist/src/types/private/ModUpgradedWithFeatures.d.ts.map +1 -1
  23. package/package.json +2 -2
  24. package/src/callbacks.ts +2 -2
  25. package/src/classes/features/other/customStages/backdrop.ts +8 -6
  26. package/src/core/upgradeMod.ts +0 -1
  27. package/src/functions/modFeatures.ts +2 -2
  28. package/src/objects/LRoomShapeToRectangles.ts +6 -5
  29. package/src/objects/englishLevelNames.ts +2 -6
  30. package/src/objects/isaacAPIClassTypeToFunctions.ts +8 -6
  31. package/src/objects/roomShapeToDoorSlotsToGridIndexDelta.ts +6 -6
  32. package/src/types/private/CallbackTuple.ts +8 -8
  33. package/src/types/private/ModUpgradedWithFeatures.ts +1 -1
@@ -7094,7 +7094,7 @@ export declare function initArray<T>(defaultValue: T, size: int): T[];
7094
7094
  * passed in.
7095
7095
  */
7096
7096
  export declare function initModFeatures<T extends ReadonlyArray<typeof ModFeature>>(mod: ModUpgraded, modFeatures: T): {
7097
- [Key in keyof T]: InstanceType<T[Key]>;
7097
+ [K in keyof T]: InstanceType<T[K]>;
7098
7098
  };
7099
7099
 
7100
7100
  /** Helper function to determine if the current room shape is one of the four L room shapes. */
@@ -7488,7 +7488,7 @@ declare type ISCFeatureTuple<T extends readonly ISCFeature[]> = ISCFeature exten
7488
7488
  * same private fields will cause a `never` type.
7489
7489
  */
7490
7490
  declare type ISCFeatureTupleToClassTuple<T extends ISCFeature[]> = {
7491
- [Key in keyof T]: PublicInterface<ISCFeatureToClass[T[Key]]>;
7491
+ [K in keyof T]: PublicInterface<ISCFeatureToClass[T[K]]>;
7492
7492
  };
7493
7493
 
7494
7494
  /**
@@ -15419,7 +15419,6 @@ export declare type UnionToIntersection<U> = (U extends U ? (u: U) => 0 : never)
15419
15419
  * specified number of seconds (if the "--luadebug" launch flag is turned on)
15420
15420
  * or milliseconds (if the "--luadebug" launch flag is turned off).
15421
15421
  * @returns The upgraded mod object.
15422
- * @beta A dummy field used to hide this function from `api-extractor`.
15423
15422
  */
15424
15423
  export declare function upgradeMod<T extends readonly ISCFeature[] = never[]>(modVanilla: Mod, features?: ISCFeatureTuple<T>, debug?: boolean, timeThreshold?: float): ModUpgradedWithFeatures<T>;
15425
15424
 
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 21.5.1
3
+ isaacscript-common 21.5.3
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -14825,7 +14825,7 @@ ____exports.DaddyLongLegsState.SPITTING_SPIDERS_ATTACK = 8
14825
14825
  ____exports.DaddyLongLegsState[____exports.DaddyLongLegsState.SPITTING_SPIDERS_ATTACK] = "SPITTING_SPIDERS_ATTACK"
14826
14826
  ____exports.DaddyLongLegsState.MULTI_STOMP_ATTACK_MAIN = 9
14827
14827
  ____exports.DaddyLongLegsState[____exports.DaddyLongLegsState.MULTI_STOMP_ATTACK_MAIN] = "MULTI_STOMP_ATTACK_MAIN"
14828
- --- For `EntityType.BIG_HORN` (411).
14828
+ --- For `EntityType.BIG_HORN` (411), `BigHornVariant.BIG_HORN` (0).
14829
14829
  ____exports.BigHornState = {}
14830
14830
  ____exports.BigHornState.IDLE = 3
14831
14831
  ____exports.BigHornState[____exports.BigHornState.IDLE] = "IDLE"
@@ -112,7 +112,7 @@ declare const MOD_CALLBACK_CUSTOM_TO_CLASS: {
112
112
  readonly 109: typeof cc.PreRoomEntitySpawnFilter;
113
113
  };
114
114
  export type ModCallbackCustomToClass = {
115
- readonly [Key in keyof typeof MOD_CALLBACK_CUSTOM_TO_CLASS]: InstanceType<(typeof MOD_CALLBACK_CUSTOM_TO_CLASS)[Key]>;
115
+ readonly [K in keyof typeof MOD_CALLBACK_CUSTOM_TO_CLASS]: InstanceType<(typeof MOD_CALLBACK_CUSTOM_TO_CLASS)[K]>;
116
116
  };
117
117
  export declare function getCallbacks(): ModCallbackCustomToClass;
118
118
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"callbacks.d.ts","sourceRoot":"","sources":["../../src/callbacks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAKxC,QAAA,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6HsB,CAAC;AAEzD,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,GAAG,IAAI,MAAM,OAAO,4BAA4B,GAAG,YAAY,CACvE,CAAC,OAAO,4BAA4B,CAAC,CAAC,GAAG,CAAC,CAC3C;CACF,CAAC;AAEF,wBAAgB,YAAY,IAAI,wBAAwB,CASvD"}
1
+ {"version":3,"file":"callbacks.d.ts","sourceRoot":"","sources":["../../src/callbacks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAKxC,QAAA,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6HsB,CAAC;AAEzD,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,CAAC,IAAI,MAAM,OAAO,4BAA4B,GAAG,YAAY,CACrE,CAAC,OAAO,4BAA4B,CAAC,CAAC,CAAC,CAAC,CACzC;CACF,CAAC;AAEF,wBAAgB,YAAY,IAAI,wBAAwB,CASvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"backdrop.d.ts","sourceRoot":"","sources":["../../../../../../src/classes/features/other/customStages/backdrop.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AA0EzE,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAcrE"}
1
+ {"version":3,"file":"backdrop.d.ts","sourceRoot":"","sources":["../../../../../../src/classes/features/other/customStages/backdrop.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AA4EzE,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAcrE"}
@@ -29,7 +29,6 @@ type ISCFeatureTuple<T extends readonly ISCFeature[]> = ISCFeature extends T["le
29
29
  * specified number of seconds (if the "--luadebug" launch flag is turned on)
30
30
  * or milliseconds (if the "--luadebug" launch flag is turned off).
31
31
  * @returns The upgraded mod object.
32
- * @beta A dummy field used to hide this function from `api-extractor`.
33
32
  */
34
33
  export declare function upgradeMod<T extends readonly ISCFeature[] = never[]>(modVanilla: Mod, features?: ISCFeatureTuple<T>, debug?: boolean, timeThreshold?: float): ModUpgradedWithFeatures<T>;
35
34
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"upgradeMod.d.ts","sourceRoot":"","sources":["../../../src/core/upgradeMod.ts"],"names":[],"mappings":";;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAIjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AAEnF,KAAK,eAAe,CAAC,CAAC,SAAS,SAAS,UAAU,EAAE,IAClD,UAAU,SAAS,CAAC,CAAC,QAAQ,CAAC,GAC1B,8FAA8F,GAC9F,CAAC,CAAC;AAER;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,SAAS,UAAU,EAAE,GAAG,KAAK,EAAE,EAClE,UAAU,EAAE,GAAG,EACf,QAAQ,GAAE,eAAe,CAAC,CAAC,CAAuC,EAClE,KAAK,UAAQ,EACb,aAAa,CAAC,EAAE,KAAK,GACpB,uBAAuB,CAAC,CAAC,CAAC,CAkB5B"}
1
+ {"version":3,"file":"upgradeMod.d.ts","sourceRoot":"","sources":["../../../src/core/upgradeMod.ts"],"names":[],"mappings":";;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAIjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AAEnF,KAAK,eAAe,CAAC,CAAC,SAAS,SAAS,UAAU,EAAE,IAClD,UAAU,SAAS,CAAC,CAAC,QAAQ,CAAC,GAC1B,8FAA8F,GAC9F,CAAC,CAAC;AAER;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,SAAS,UAAU,EAAE,GAAG,KAAK,EAAE,EAClE,UAAU,EAAE,GAAG,EACf,QAAQ,GAAE,eAAe,CAAC,CAAC,CAAuC,EAClE,KAAK,UAAQ,EACb,aAAa,CAAC,EAAE,KAAK,GACpB,uBAAuB,CAAC,CAAC,CAAC,CAkB5B"}
@@ -45,7 +45,6 @@ end
45
45
  -- specified number of seconds (if the "--luadebug" launch flag is turned on)
46
46
  -- or milliseconds (if the "--luadebug" launch flag is turned off).
47
47
  -- @returns The upgraded mod object.
48
- -- @beta A dummy field used to hide this function from `api-extractor`.
49
48
  function ____exports.upgradeMod(self, modVanilla, features, ____debug, timeThreshold)
50
49
  if features == nil then
51
50
  features = {}
@@ -22,6 +22,6 @@ import { ModUpgraded } from "../classes/ModUpgraded";
22
22
  * passed in.
23
23
  */
24
24
  export declare function initModFeatures<T extends ReadonlyArray<typeof ModFeature>>(mod: ModUpgraded, modFeatures: T): {
25
- [Key in keyof T]: InstanceType<T[Key]>;
25
+ [K in keyof T]: InstanceType<T[K]>;
26
26
  };
27
27
  //# sourceMappingURL=modFeatures.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"modFeatures.d.ts","sourceRoot":"","sources":["../../../src/functions/modFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,aAAa,CAAC,OAAO,UAAU,CAAC,EACxE,GAAG,EAAE,WAAW,EAChB,WAAW,EAAE,CAAC,GACb;KAAG,GAAG,IAAI,MAAM,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAAE,CAY5C"}
1
+ {"version":3,"file":"modFeatures.d.ts","sourceRoot":"","sources":["../../../src/functions/modFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,aAAa,CAAC,OAAO,UAAU,CAAC,EACxE,GAAG,EAAE,WAAW,EAChB,WAAW,EAAE,CAAC,GACb;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAYxC"}
@@ -9,8 +9,6 @@ interface LRoomRectangles {
9
9
  * "Vector(0, 0)" corresponds to the top left tile of a room, not including the walls. (The top-left
10
10
  * wall would be at "Vector(-1, -1)".)
11
11
  */
12
- export declare const L_ROOM_SHAPE_TO_RECTANGLES: {
13
- readonly [Key in RoomShape]?: LRoomRectangles;
14
- };
12
+ export declare const L_ROOM_SHAPE_TO_RECTANGLES: Readonly<Partial<Record<RoomShape, LRoomRectangles>>>;
15
13
  export {};
16
14
  //# sourceMappingURL=LRoomShapeToRectangles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LRoomShapeToRectangles.d.ts","sourceRoot":"","sources":["../../../src/objects/LRoomShapeToRectangles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAIzD,UAAU,eAAe;IACvB,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC/C,QAAQ,CAAC,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC7C,QAAQ,CAAC,qBAAqB,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAClD;AAID;;;GAGG;AAEH,eAAO,MAAM,0BAA0B,EAAE;IACvC,QAAQ,EAAE,GAAG,IAAI,SAAS,CAAC,CAAC,EAAE,eAAe;CAiCrC,CAAC"}
1
+ {"version":3,"file":"LRoomShapeToRectangles.d.ts","sourceRoot":"","sources":["../../../src/objects/LRoomShapeToRectangles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAIzD,UAAU,eAAe;IACvB,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC/C,QAAQ,CAAC,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC7C,QAAQ,CAAC,qBAAqB,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAClD;AAID;;;GAGG;AAGH,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAC/C,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC,CAiC5C,CAAC"}
@@ -1,4 +1,3 @@
1
- import { LevelStage, StageType } from "isaac-typescript-definitions";
2
1
  /**
3
2
  * A mapping of stage and stage types to the corresponding English level name.
4
3
  *
@@ -8,8 +7,109 @@ import { LevelStage, StageType } from "isaac-typescript-definitions";
8
7
  * Note that this contains "Blue Womb" instead of "???" for stage 9.
9
8
  */
10
9
  export declare const ENGLISH_LEVEL_NAMES: {
11
- readonly [levelStage in LevelStage]: {
12
- readonly [stageType in StageType]: string;
10
+ readonly 1: {
11
+ readonly 0: "Basement 1";
12
+ readonly 1: "Cellar 1";
13
+ readonly 2: "Burning Basement 1";
14
+ readonly 3: "Basement";
15
+ readonly 4: "Downpour 1";
16
+ readonly 5: "Dross 1";
17
+ };
18
+ readonly 2: {
19
+ readonly 0: "Basement 2";
20
+ readonly 1: "Cellar 2";
21
+ readonly 2: "Burning Basement 2";
22
+ readonly 3: "Basement";
23
+ readonly 4: "Downpour 2";
24
+ readonly 5: "Dross 2";
25
+ };
26
+ readonly 3: {
27
+ readonly 0: "Caves 1";
28
+ readonly 1: "Catacombs 1";
29
+ readonly 2: "Flooded Caves 1";
30
+ readonly 3: "Caves";
31
+ readonly 4: "Mines 1";
32
+ readonly 5: "Ashpit 1";
33
+ };
34
+ readonly 4: {
35
+ readonly 0: "Caves 2";
36
+ readonly 1: "Catacombs 2";
37
+ readonly 2: "Flooded Caves 2";
38
+ readonly 3: "Caves";
39
+ readonly 4: "Mines 2";
40
+ readonly 5: "Ashpit 2";
41
+ };
42
+ readonly 5: {
43
+ readonly 0: "Depths 1";
44
+ readonly 1: "Necropolis 1";
45
+ readonly 2: "Dank Depths 1";
46
+ readonly 3: "Depths";
47
+ readonly 4: "Mausoleum 1";
48
+ readonly 5: "Gehenna 1";
49
+ };
50
+ readonly 6: {
51
+ readonly 0: "Depths 2";
52
+ readonly 1: "Necropolis 2";
53
+ readonly 2: "Dank Depths 2";
54
+ readonly 3: "Depths";
55
+ readonly 4: "Mausoleum 2";
56
+ readonly 5: "Gehenna 2";
57
+ };
58
+ readonly 7: {
59
+ readonly 0: "Womb 1";
60
+ readonly 1: "Utero 1";
61
+ readonly 2: "Scarred Womb 1";
62
+ readonly 3: "Womb";
63
+ readonly 4: "Corpse 1";
64
+ readonly 5: "Mortis 1";
65
+ };
66
+ readonly 8: {
67
+ readonly 0: "Womb 2";
68
+ readonly 1: "Utero 2";
69
+ readonly 2: "Scarred Womb 2";
70
+ readonly 3: "Womb";
71
+ readonly 4: "Corpse 2";
72
+ readonly 5: "Mortis 2";
73
+ };
74
+ readonly 9: {
75
+ readonly 0: "Blue Womb";
76
+ readonly 1: "Blue Womb";
77
+ readonly 2: "Blue Womb";
78
+ readonly 3: "Blue Womb";
79
+ readonly 4: "Blue Womb";
80
+ readonly 5: "Blue Womb";
81
+ };
82
+ readonly 10: {
83
+ readonly 0: "Sheol";
84
+ readonly 1: "Cathedral";
85
+ readonly 2: "Undefined";
86
+ readonly 3: "Sheol";
87
+ readonly 4: "Undefined";
88
+ readonly 5: "Undefined";
89
+ };
90
+ readonly 11: {
91
+ readonly 0: "Dark Room";
92
+ readonly 1: "The Chest";
93
+ readonly 2: "Undefined";
94
+ readonly 3: "The Shop";
95
+ readonly 4: "Undefined";
96
+ readonly 5: "Undefined";
97
+ };
98
+ readonly 12: {
99
+ readonly 0: "The Void";
100
+ readonly 1: "The Void";
101
+ readonly 2: "The Void";
102
+ readonly 3: "The Void";
103
+ readonly 4: "The Void";
104
+ readonly 5: "The Void";
105
+ };
106
+ readonly 13: {
107
+ readonly 0: "Home";
108
+ readonly 1: "Home";
109
+ readonly 2: "Home";
110
+ readonly 3: "Home";
111
+ readonly 4: "Home";
112
+ readonly 5: "Home";
13
113
  };
14
114
  };
15
115
  //# sourceMappingURL=englishLevelNames.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"englishLevelNames.d.ts","sourceRoot":"","sources":["../../../src/objects/englishLevelNames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAGrE;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,EAAE;IAChC,QAAQ,EAAE,UAAU,IAAI,UAAU,GAAG;QACnC,QAAQ,EAAE,SAAS,IAAI,SAAS,GAAG,MAAM;KAC1C;CA0GO,CAAC"}
1
+ {"version":3,"file":"englishLevelNames.d.ts","sourceRoot":"","sources":["../../../src/objects/englishLevelNames.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyGkC,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import { CopyableIsaacAPIClassType } from "isaac-typescript-definitions";
2
- import { SerializedBitSet128 } from "../functions/bitSet128";
3
- import { SerializedColor } from "../functions/color";
4
- import { SerializedKColor } from "../functions/kColor";
5
- import { SerializedRNG } from "../functions/rng";
6
- import { SerializedVector } from "../functions/vector";
2
+ import { copyBitSet128, deserializeBitSet128, isBitSet128, isSerializedBitSet128, serializeBitSet128, SerializedBitSet128 } from "../functions/bitSet128";
3
+ import { copyColor, deserializeColor, isColor, isSerializedColor, serializeColor, SerializedColor } from "../functions/color";
4
+ import { copyKColor, deserializeKColor, isKColor, isSerializedKColor, SerializedKColor, serializeKColor } from "../functions/kColor";
5
+ import { copyRNG, deserializeRNG, isRNG, isSerializedRNG, SerializedRNG, serializeRNG } from "../functions/rng";
6
+ import { copyVector, deserializeVector, isSerializedVector, isVector, SerializedVector, serializeVector } from "../functions/vector";
7
7
  /** A type representing an Isaac API class that can be safely copied or serialized. */
8
8
  export type CopyableIsaacAPIClass = BitSet128 | Color | KColor | RNG | Vector;
9
9
  /**
@@ -35,6 +35,40 @@ export interface IsaacAPIClassTypeFunctions<T, SerializedT> {
35
35
  deserialize: (object: SerializedT) => T;
36
36
  }
37
37
  export declare const ISAAC_API_CLASS_TYPE_TO_FUNCTIONS: {
38
- readonly [Key in CopyableIsaacAPIClassType]: IsaacAPIClassTypeFunctions<IsaacAPIClassTypeToType[Key], IsaacAPIClassTypeToSerializedType[Key]>;
38
+ readonly BitSet128: {
39
+ readonly is: typeof isBitSet128;
40
+ readonly isSerialized: typeof isSerializedBitSet128;
41
+ readonly copy: typeof copyBitSet128;
42
+ readonly serialize: typeof serializeBitSet128;
43
+ readonly deserialize: typeof deserializeBitSet128;
44
+ };
45
+ readonly Color: {
46
+ readonly is: typeof isColor;
47
+ readonly isSerialized: typeof isSerializedColor;
48
+ readonly copy: typeof copyColor;
49
+ readonly serialize: typeof serializeColor;
50
+ readonly deserialize: typeof deserializeColor;
51
+ };
52
+ readonly KColor: {
53
+ readonly is: typeof isKColor;
54
+ readonly isSerialized: typeof isSerializedKColor;
55
+ readonly copy: typeof copyKColor;
56
+ readonly serialize: typeof serializeKColor;
57
+ readonly deserialize: typeof deserializeKColor;
58
+ };
59
+ readonly RNG: {
60
+ readonly is: typeof isRNG;
61
+ readonly isSerialized: typeof isSerializedRNG;
62
+ readonly copy: typeof copyRNG;
63
+ readonly serialize: typeof serializeRNG;
64
+ readonly deserialize: typeof deserializeRNG;
65
+ };
66
+ readonly Vector: {
67
+ readonly is: typeof isVector;
68
+ readonly isSerialized: typeof isSerializedVector;
69
+ readonly copy: typeof copyVector;
70
+ readonly serialize: typeof serializeVector;
71
+ readonly deserialize: typeof deserializeVector;
72
+ };
39
73
  };
40
74
  //# sourceMappingURL=isaacAPIClassTypeToFunctions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isaacAPIClassTypeToFunctions.d.ts","sourceRoot":"","sources":["../../../src/objects/isaacAPIClassTypeToFunctions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAML,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAML,eAAe,EAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAKL,gBAAgB,EAEjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAKL,aAAa,EAEd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAKL,gBAAgB,EAEjB,MAAM,qBAAqB,CAAC;AAE7B,sFAAsF;AACtF,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC;AAE9E;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAC/B,mBAAmB,GACnB,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,gBAAgB,CAAC;AAErB,MAAM,WAAW,uBAAuB;IACtC,CAAC,yBAAyB,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC;IACnD,CAAC,yBAAyB,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IACzC,CAAC,yBAAyB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC5C,CAAC,yBAAyB,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC;IACrC,CAAC,yBAAyB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC5C;AAED,MAAM,WAAW,iCAAiC;IAChD,CAAC,yBAAyB,CAAC,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAC7D,CAAC,yBAAyB,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC;IACnD,CAAC,yBAAyB,CAAC,OAAO,CAAC,EAAE,gBAAgB,CAAC;IACtD,CAAC,yBAAyB,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC;IAC/C,CAAC,yBAAyB,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAC;CACtD;AAED,MAAM,WAAW,0BAA0B,CAAC,CAAC,EAAE,WAAW;IACxD,EAAE,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,MAAM,IAAI,CAAC,CAAC;IACrC,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,MAAM,IAAI,WAAW,CAAC;IACzD,IAAI,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC;IACvB,SAAS,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,WAAW,CAAC;IACtC,WAAW,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,CAAC,CAAC;CACzC;AAED,eAAO,MAAM,iCAAiC,EAAE;IAC9C,QAAQ,EAAE,GAAG,IAAI,yBAAyB,GAAG,0BAA0B,CACrE,uBAAuB,CAAC,GAAG,CAAC,EAC5B,iCAAiC,CAAC,GAAG,CAAC,CACvC;CAqCO,CAAC"}
1
+ {"version":3,"file":"isaacAPIClassTypeToFunctions.d.ts","sourceRoot":"","sources":["../../../src/objects/isaacAPIClassTypeToFunctions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,WAAW,EACX,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,SAAS,EACT,gBAAgB,EACh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C,MAAM,CAAC,EAAE,gBAAgB,CAAC;CACtD;AAED,MAAM,WAAW,0BAA0B,CAAC,CAAC,EAAE,WAAW;IACxD,EAAE,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,MAAM,IAAI,CAAC,CAAC;IACrC,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,MAAM,IAAI,WAAW,CAAC;IACzD,IAAI,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC;IACvB,SAAS,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,WAAW,CAAC;IACtC,WAAW,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,CAAC,CAAC;CACzC;AASD,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCG,CAAC"}
@@ -3,7 +3,5 @@ import { DoorSlot, RoomShape } from "isaac-typescript-definitions";
3
3
  * Deltas are considered to be from the safe grid index of the room (i.e. the top left corner, or
4
4
  * top right corner in the case of `RoomShape.LTL`).
5
5
  */
6
- export declare const ROOM_SHAPE_TO_DOOR_SLOTS_TO_GRID_INDEX_DELTA: {
7
- readonly [Key in RoomShape]: ReadonlyMap<DoorSlot, int>;
8
- };
6
+ export declare const ROOM_SHAPE_TO_DOOR_SLOTS_TO_GRID_INDEX_DELTA: Readonly<Record<RoomShape, ReadonlyMap<DoorSlot, int>>>;
9
7
  //# sourceMappingURL=roomShapeToDoorSlotsToGridIndexDelta.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"roomShapeToDoorSlotsToGridIndexDelta.d.ts","sourceRoot":"","sources":["../../../src/objects/roomShapeToDoorSlotsToGridIndexDelta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AASnE;;;GAGG;AAGH,eAAO,MAAM,4CAA4C,EAAE;IACzD,QAAQ,EAAE,GAAG,IAAI,SAAS,GAAG,WAAW,CAAC,QAAQ,EAAE,GAAG,CAAC;CAiH/C,CAAC"}
1
+ {"version":3,"file":"roomShapeToDoorSlotsToGridIndexDelta.d.ts","sourceRoot":"","sources":["../../../src/objects/roomShapeToDoorSlotsToGridIndexDelta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AASnE;;;GAGG;AAGH,eAAO,MAAM,4CAA4C,EAAE,QAAQ,CACjE,MAAM,CAAC,SAAS,EAAE,WAAW,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAiH9C,CAAC"}
@@ -8,10 +8,10 @@ import { AllButFirst } from "../AllButFirst";
8
8
  * added/removed.
9
9
  */
10
10
  export type CallbackTuple = {
11
- [Key in ModCallback]: [
12
- modCallback: Key,
13
- callbackFunc: AddCallbackParameters[Key][0],
14
- optionalArgs?: AllButFirst<AddCallbackParameters[Key]>
11
+ [K in ModCallback]: [
12
+ modCallback: K,
13
+ callbackFunc: AddCallbackParameters[K][0],
14
+ optionalArgs?: AllButFirst<AddCallbackParameters[K]>
15
15
  ];
16
16
  }[ModCallback];
17
17
  /**
@@ -20,10 +20,10 @@ export type CallbackTuple = {
20
20
  * get added/removed.
21
21
  */
22
22
  export type CustomCallbackTuple = {
23
- [Key in ModCallbackCustom]: [
24
- modCallback: Key,
25
- callbackFunc: AddCallbackParametersCustom[Key][0],
26
- optionalArgs?: AllButFirst<AddCallbackParametersCustom[Key]>
23
+ [K in ModCallbackCustom]: [
24
+ modCallback: K,
25
+ callbackFunc: AddCallbackParametersCustom[K][0],
26
+ optionalArgs?: AllButFirst<AddCallbackParametersCustom[K]>
27
27
  ];
28
28
  }[ModCallbackCustom];
29
29
  //# sourceMappingURL=CallbackTuple.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CallbackTuple.d.ts","sourceRoot":"","sources":["../../../../src/types/private/CallbackTuple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,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CAAC,WAAW,CAAC,CAAC;AAEf;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG;KAC/B,CAAC,IAAI,iBAAiB,GAAG;QACxB,WAAW,EAAE,CAAC;QACd,YAAY,EAAE,2BAA2B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/C,YAAY,CAAC,EAAE,WAAW,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC;KAC3D;CACF,CAAC,iBAAiB,CAAC,CAAC"}
@@ -30,7 +30,7 @@ type ISCFeaturesToKeys<T extends readonly ISCFeature[]> = Omit<TupleToIntersecti
30
30
  * same private fields will cause a `never` type.
31
31
  */
32
32
  type ISCFeatureTupleToClassTuple<T extends ISCFeature[]> = {
33
- [Key in keyof T]: PublicInterface<ISCFeatureToClass[T[Key]]>;
33
+ [K in keyof T]: PublicInterface<ISCFeatureToClass[T[K]]>;
34
34
  };
35
35
  export {};
36
36
  //# sourceMappingURL=ModUpgradedWithFeatures.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModUpgradedWithFeatures.d.ts","sourceRoot":"","sources":["../../../../src/types/private/ModUpgradedWithFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,SAAS,UAAU,EAAE,GAAG,EAAE,IACtE,WAAW,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC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;KACxD,CAAC,IAAI,MAAM,CAAC,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACzD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "21.5.1",
3
+ "version": "21.5.3",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -22,6 +22,6 @@
22
22
  "main": "dist/src/index",
23
23
  "types": "dist/index.rollup.d.ts",
24
24
  "dependencies": {
25
- "isaac-typescript-definitions": "^11.1.1"
25
+ "isaac-typescript-definitions": "^11.1.2"
26
26
  }
27
27
  }
package/src/callbacks.ts CHANGED
@@ -131,8 +131,8 @@ const MOD_CALLBACK_CUSTOM_TO_CLASS = {
131
131
  } as const satisfies Record<ModCallbackCustom, AnyClass>;
132
132
 
133
133
  export type ModCallbackCustomToClass = {
134
- readonly [Key in keyof typeof MOD_CALLBACK_CUSTOM_TO_CLASS]: InstanceType<
135
- (typeof MOD_CALLBACK_CUSTOM_TO_CLASS)[Key]
134
+ readonly [K in keyof typeof MOD_CALLBACK_CUSTOM_TO_CLASS]: InstanceType<
135
+ (typeof MOD_CALLBACK_CUSTOM_TO_CLASS)[K]
136
136
  >;
137
137
  };
138
138
 
@@ -36,12 +36,12 @@ enum BackdropKind {
36
36
  }
37
37
 
38
38
  /** This is created by the vanilla Basement files. */
39
- const DEFAULT_BACKDROP: NonNullable<CustomStage["backdropPNGPaths"]> = {
39
+ const DEFAULT_BACKDROP = {
40
40
  nFloors: [`${ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH}/backdrop/nfloor.png`],
41
41
  lFloors: [`${ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH}/backdrop/lfloor.png`], // cspell:ignore lfloor
42
42
  walls: [`${ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH}/backdrop/wall.png`],
43
43
  corners: [`${ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH}/backdrop/corner.png`],
44
- } as const;
44
+ } as const satisfies NonNullable<CustomStage["backdropPNGPaths"]>;
45
45
 
46
46
  const ROOM_SHAPE_WALL_ANM2_LAYERS = {
47
47
  [RoomShape.SHAPE_1x1]: 44, // 1
@@ -58,16 +58,18 @@ const ROOM_SHAPE_WALL_ANM2_LAYERS = {
58
58
  [RoomShape.LBR]: 63, // 12
59
59
  } as const satisfies Record<RoomShape, int>;
60
60
 
61
- const ROOM_SHAPE_WALL_EXTRA_ANM2_LAYERS: {
62
- readonly [Key in RoomShape]?: int;
63
- } = {
61
+ // We don't use `as const` since we need the object to be indexable by all `RoomShape`.
62
+ // eslint-disable-next-line isaacscript/require-capital-const-assertions
63
+ const ROOM_SHAPE_WALL_EXTRA_ANM2_LAYERS: Readonly<
64
+ Partial<Record<RoomShape, int>>
65
+ > = {
64
66
  [RoomShape.SHAPE_2x1]: 7, // 6
65
67
  [RoomShape.SHAPE_2x2]: 21, // 8
66
68
  [RoomShape.LTL]: 19, // 9
67
69
  [RoomShape.LTR]: 19, // 10
68
70
  [RoomShape.LBL]: 19, // 11
69
71
  [RoomShape.LBR]: 19, // 12
70
- } as const;
72
+ };
71
73
 
72
74
  const WALL_OFFSET = Vector(-80, -80);
73
75
 
@@ -36,7 +36,6 @@ type ISCFeatureTuple<T extends readonly ISCFeature[]> =
36
36
  * specified number of seconds (if the "--luadebug" launch flag is turned on)
37
37
  * or milliseconds (if the "--luadebug" launch flag is turned off).
38
38
  * @returns The upgraded mod object.
39
- * @beta A dummy field used to hide this function from `api-extractor`.
40
39
  */
41
40
  export function upgradeMod<T extends readonly ISCFeature[] = never[]>(
42
41
  modVanilla: Mod,
@@ -25,7 +25,7 @@ import { ModUpgraded } from "../classes/ModUpgraded";
25
25
  export function initModFeatures<T extends ReadonlyArray<typeof ModFeature>>(
26
26
  mod: ModUpgraded,
27
27
  modFeatures: T,
28
- ): { [Key in keyof T]: InstanceType<T[Key]> } {
28
+ ): { [K in keyof T]: InstanceType<T[K]> } {
29
29
  const instantiatedModFeatures: ModFeature[] = [];
30
30
 
31
31
  for (const modFeature of modFeatures) {
@@ -36,5 +36,5 @@ export function initModFeatures<T extends ReadonlyArray<typeof ModFeature>>(
36
36
  instantiatedModFeatures.push(instantiatedModFeature);
37
37
  }
38
38
 
39
- return instantiatedModFeatures as { [Key in keyof T]: InstanceType<T[Key]> };
39
+ return instantiatedModFeatures as { [K in keyof T]: InstanceType<T[K]> };
40
40
  }
@@ -15,10 +15,11 @@ const TWO_BY_TWO_BOTTOM_RIGHT = newReadonlyVector(25, 13);
15
15
  * "Vector(0, 0)" corresponds to the top left tile of a room, not including the walls. (The top-left
16
16
  * wall would be at "Vector(-1, -1)".)
17
17
  */
18
- // We need to specify the type so that the object will be indexable by room shapes.
19
- export const L_ROOM_SHAPE_TO_RECTANGLES: {
20
- readonly [Key in RoomShape]?: LRoomRectangles;
21
- } = {
18
+ // We don't use `as const` since we need the object to be indexable by all `RoomShape`.
19
+ // eslint-disable-next-line isaacscript/require-capital-const-assertions
20
+ export const L_ROOM_SHAPE_TO_RECTANGLES: Readonly<
21
+ Partial<Record<RoomShape, LRoomRectangles>>
22
+ > = {
22
23
  // 9
23
24
  [RoomShape.LTL]: {
24
25
  verticalTopLeft: newReadonlyVector(13, 0),
@@ -50,4 +51,4 @@ export const L_ROOM_SHAPE_TO_RECTANGLES: {
50
51
  horizontalTopLeft: VectorZero,
51
52
  horizontalBottomRight: newReadonlyVector(12, 13),
52
53
  },
53
- } as const;
54
+ };
@@ -9,11 +9,7 @@ import { LevelStage, StageType } from "isaac-typescript-definitions";
9
9
  *
10
10
  * Note that this contains "Blue Womb" instead of "???" for stage 9.
11
11
  */
12
- export const ENGLISH_LEVEL_NAMES: {
13
- readonly [levelStage in LevelStage]: {
14
- readonly [stageType in StageType]: string;
15
- };
16
- } = {
12
+ export const ENGLISH_LEVEL_NAMES = {
17
13
  [LevelStage.BASEMENT_1]: {
18
14
  [StageType.ORIGINAL]: "Basement 1",
19
15
  [StageType.WRATH_OF_THE_LAMB]: "Cellar 1",
@@ -118,4 +114,4 @@ export const ENGLISH_LEVEL_NAMES: {
118
114
  [StageType.REPENTANCE]: "Home",
119
115
  [StageType.REPENTANCE_B]: "Home",
120
116
  },
121
- } as const;
117
+ } as const satisfies Record<LevelStage, Record<StageType, string>>;
@@ -80,12 +80,14 @@ export interface IsaacAPIClassTypeFunctions<T, SerializedT> {
80
80
  deserialize: (object: SerializedT) => T;
81
81
  }
82
82
 
83
- export const ISAAC_API_CLASS_TYPE_TO_FUNCTIONS: {
84
- readonly [Key in CopyableIsaacAPIClassType]: IsaacAPIClassTypeFunctions<
85
- IsaacAPIClassTypeToType[Key],
86
- IsaacAPIClassTypeToSerializedType[Key]
83
+ type IsaacAPIClassTypeToFunctions = {
84
+ readonly [K in CopyableIsaacAPIClassType]: IsaacAPIClassTypeFunctions<
85
+ IsaacAPIClassTypeToType[K],
86
+ IsaacAPIClassTypeToSerializedType[K]
87
87
  >;
88
- } = {
88
+ };
89
+
90
+ export const ISAAC_API_CLASS_TYPE_TO_FUNCTIONS = {
89
91
  [CopyableIsaacAPIClassType.BIT_SET_128]: {
90
92
  is: isBitSet128,
91
93
  isSerialized: isSerializedBitSet128,
@@ -121,4 +123,4 @@ export const ISAAC_API_CLASS_TYPE_TO_FUNCTIONS: {
121
123
  serialize: serializeVector,
122
124
  deserialize: deserializeVector,
123
125
  },
124
- } as const;
126
+ } as const satisfies IsaacAPIClassTypeToFunctions;
@@ -11,11 +11,11 @@ const DOWN = LEVEL_GRID_ROW_WIDTH;
11
11
  * Deltas are considered to be from the safe grid index of the room (i.e. the top left corner, or
12
12
  * top right corner in the case of `RoomShape.LTL`).
13
13
  */
14
- // We need the maps to be widened for all `DoorSlot`, so we specify the type instead of using the
15
- // `satisfies` operator.
16
- export const ROOM_SHAPE_TO_DOOR_SLOTS_TO_GRID_INDEX_DELTA: {
17
- readonly [Key in RoomShape]: ReadonlyMap<DoorSlot, int>;
18
- } = {
14
+ // We don't use `as const` since we need the map to be indexable by all `DoorSlot`.
15
+ // eslint-disable-next-line isaacscript/require-capital-const-assertions
16
+ export const ROOM_SHAPE_TO_DOOR_SLOTS_TO_GRID_INDEX_DELTA: Readonly<
17
+ Record<RoomShape, ReadonlyMap<DoorSlot, int>>
18
+ > = {
19
19
  // 1
20
20
  [RoomShape.SHAPE_1x1]: new ReadonlyMap([
21
21
  [DoorSlot.LEFT_0, LEFT], // 0
@@ -127,4 +127,4 @@ export const ROOM_SHAPE_TO_DOOR_SLOTS_TO_GRID_INDEX_DELTA: {
127
127
  [DoorSlot.RIGHT_1, DOWN + RIGHT], // 6
128
128
  [DoorSlot.DOWN_1, RIGHT + DOWN], // 7
129
129
  ]),
130
- } as const;
130
+ };
@@ -9,10 +9,10 @@ import { AllButFirst } from "../AllButFirst";
9
9
  * added/removed.
10
10
  */
11
11
  export type CallbackTuple = {
12
- [Key in ModCallback]: [
13
- modCallback: Key,
14
- callbackFunc: AddCallbackParameters[Key][0],
15
- optionalArgs?: AllButFirst<AddCallbackParameters[Key]>,
12
+ [K in ModCallback]: [
13
+ modCallback: K,
14
+ callbackFunc: AddCallbackParameters[K][0],
15
+ optionalArgs?: AllButFirst<AddCallbackParameters[K]>,
16
16
  ];
17
17
  }[ModCallback];
18
18
 
@@ -22,9 +22,9 @@ export type CallbackTuple = {
22
22
  * get added/removed.
23
23
  */
24
24
  export type CustomCallbackTuple = {
25
- [Key in ModCallbackCustom]: [
26
- modCallback: Key,
27
- callbackFunc: AddCallbackParametersCustom[Key][0],
28
- optionalArgs?: AllButFirst<AddCallbackParametersCustom[Key]>,
25
+ [K in ModCallbackCustom]: [
26
+ modCallback: K,
27
+ callbackFunc: AddCallbackParametersCustom[K][0],
28
+ optionalArgs?: AllButFirst<AddCallbackParametersCustom[K]>,
29
29
  ];
30
30
  }[ModCallbackCustom];
@@ -37,5 +37,5 @@ type ISCFeaturesToKeys<T extends readonly ISCFeature[]> = Omit<
37
37
  * same private fields will cause a `never` type.
38
38
  */
39
39
  type ISCFeatureTupleToClassTuple<T extends ISCFeature[]> = {
40
- [Key in keyof T]: PublicInterface<ISCFeatureToClass[T[Key]]>;
40
+ [K in keyof T]: PublicInterface<ISCFeatureToClass[T[K]]>;
41
41
  };