isaacscript-common 87.2.2 → 87.3.0
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/cachedEnumValues.d.ts +3 -15
- package/dist/cachedEnumValues.d.ts.map +1 -1
- package/dist/core/constants.d.ts +1 -5
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/functions/decorators.d.ts.map +1 -1
- package/dist/functions/math.d.ts +1 -1
- package/dist/functions/math.js +1 -1
- package/dist/functions/math.lua +1 -1
- package/dist/functions/stats.js +1 -1
- package/dist/functions/stats.lua +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.rollup.d.ts +5 -10
- package/dist/indexLua.d.ts +1 -0
- package/dist/indexLua.d.ts.map +1 -1
- package/dist/indexLua.js +1 -0
- package/dist/isaacscript-common.lua +1628 -184
- package/dist/lualib_bundle.lua +180 -181
- package/dist/maps/defaultPlayerStatMap.d.ts +1 -5
- package/dist/maps/defaultPlayerStatMap.d.ts.map +1 -1
- package/dist/objects/doorSlotToDoorSlotFlag.d.ts +9 -45
- package/dist/objects/doorSlotToDoorSlotFlag.d.ts.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/types/ObjectValues.d.ts +2 -0
- package/dist/types/ObjectValues.d.ts.map +1 -0
- package/dist/types/ObjectValues.js +2 -0
- package/dist/types/ObjectValues.lua +2 -0
- package/dist/types/TupleToIntersection.d.ts +1 -4
- package/dist/types/TupleToIntersection.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/functions/math.ts +1 -1
- package/src/functions/stats.ts +1 -1
- package/src/index.ts +1 -0
- package/src/types/ObjectValues.ts +1 -0
- package/src/types/TupleToIntersection.ts +4 -6
package/dist/lualib_bundle.lua
CHANGED
|
@@ -588,6 +588,12 @@ local function __TS__ArrayWith(self, index, value)
|
|
|
588
588
|
return copy
|
|
589
589
|
end
|
|
590
590
|
|
|
591
|
+
local function __TS__New(target, ...)
|
|
592
|
+
local instance = setmetatable({}, target.prototype)
|
|
593
|
+
instance:____constructor(...)
|
|
594
|
+
return instance
|
|
595
|
+
end
|
|
596
|
+
|
|
591
597
|
local function __TS__InstanceOf(obj, classTbl)
|
|
592
598
|
if type(classTbl) ~= "table" then
|
|
593
599
|
error("Right-hand side of 'instanceof' is not an object", 0)
|
|
@@ -607,12 +613,6 @@ local function __TS__InstanceOf(obj, classTbl)
|
|
|
607
613
|
return false
|
|
608
614
|
end
|
|
609
615
|
|
|
610
|
-
local function __TS__New(target, ...)
|
|
611
|
-
local instance = setmetatable({}, target.prototype)
|
|
612
|
-
instance:____constructor(...)
|
|
613
|
-
return instance
|
|
614
|
-
end
|
|
615
|
-
|
|
616
616
|
local function __TS__Class(self)
|
|
617
617
|
local c = {prototype = {}}
|
|
618
618
|
c.prototype.__index = c.prototype
|
|
@@ -620,35 +620,27 @@ local function __TS__Class(self)
|
|
|
620
620
|
return c
|
|
621
621
|
end
|
|
622
622
|
|
|
623
|
-
local function __TS__FunctionBind(fn, ...)
|
|
624
|
-
local boundArgs = {...}
|
|
625
|
-
return function(____, ...)
|
|
626
|
-
local args = {...}
|
|
627
|
-
__TS__ArrayUnshift(
|
|
628
|
-
args,
|
|
629
|
-
__TS__Unpack(boundArgs)
|
|
630
|
-
)
|
|
631
|
-
return fn(__TS__Unpack(args))
|
|
632
|
-
end
|
|
633
|
-
end
|
|
634
|
-
|
|
635
623
|
local __TS__Promise
|
|
636
624
|
do
|
|
637
|
-
local function
|
|
625
|
+
local function makeDeferredPromiseFactory()
|
|
638
626
|
local resolve
|
|
639
627
|
local reject
|
|
640
|
-
local
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
628
|
+
local function executor(____, res, rej)
|
|
629
|
+
resolve = res
|
|
630
|
+
reject = rej
|
|
631
|
+
end
|
|
632
|
+
return function()
|
|
633
|
+
local promise = __TS__New(__TS__Promise, executor)
|
|
634
|
+
return promise, resolve, reject
|
|
635
|
+
end
|
|
636
|
+
end
|
|
637
|
+
local makeDeferredPromise = makeDeferredPromiseFactory()
|
|
638
|
+
local function isPromiseLike(value)
|
|
639
|
+
return __TS__InstanceOf(value, __TS__Promise)
|
|
648
640
|
end
|
|
649
|
-
local function
|
|
650
|
-
return __TS__InstanceOf(thing, __TS__Promise)
|
|
641
|
+
local function doNothing(self)
|
|
651
642
|
end
|
|
643
|
+
local ____pcall = _G.pcall
|
|
652
644
|
__TS__Promise = __TS__Class()
|
|
653
645
|
__TS__Promise.name = "__TS__Promise"
|
|
654
646
|
function __TS__Promise.prototype.____constructor(self, executor)
|
|
@@ -656,206 +648,176 @@ do
|
|
|
656
648
|
self.fulfilledCallbacks = {}
|
|
657
649
|
self.rejectedCallbacks = {}
|
|
658
650
|
self.finallyCallbacks = {}
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
end
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
__TS__FunctionBind(self.reject, self)
|
|
668
|
-
)
|
|
669
|
-
end)
|
|
670
|
-
if not ____try then
|
|
671
|
-
____catch(____hasReturned)
|
|
672
|
-
end
|
|
651
|
+
local success, ____error = ____pcall(
|
|
652
|
+
executor,
|
|
653
|
+
nil,
|
|
654
|
+
function(____, v) return self:resolve(v) end,
|
|
655
|
+
function(____, err) return self:reject(err) end
|
|
656
|
+
)
|
|
657
|
+
if not success then
|
|
658
|
+
self:reject(____error)
|
|
673
659
|
end
|
|
674
660
|
end
|
|
675
|
-
function __TS__Promise.resolve(
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
)
|
|
661
|
+
function __TS__Promise.resolve(value)
|
|
662
|
+
if __TS__InstanceOf(value, __TS__Promise) then
|
|
663
|
+
return value
|
|
664
|
+
end
|
|
665
|
+
local promise = __TS__New(__TS__Promise, doNothing)
|
|
681
666
|
promise.state = 1
|
|
682
|
-
promise.value =
|
|
667
|
+
promise.value = value
|
|
683
668
|
return promise
|
|
684
669
|
end
|
|
685
670
|
function __TS__Promise.reject(reason)
|
|
686
|
-
local promise = __TS__New(
|
|
687
|
-
__TS__Promise,
|
|
688
|
-
function()
|
|
689
|
-
end
|
|
690
|
-
)
|
|
671
|
+
local promise = __TS__New(__TS__Promise, doNothing)
|
|
691
672
|
promise.state = 2
|
|
692
673
|
promise.rejectionReason = reason
|
|
693
674
|
return promise
|
|
694
675
|
end
|
|
695
676
|
__TS__Promise.prototype["then"] = function(self, onFulfilled, onRejected)
|
|
696
|
-
local
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
if isFulfilled then
|
|
707
|
-
internalCallback(nil, self.value)
|
|
708
|
-
end
|
|
709
|
-
else
|
|
710
|
-
local ____self_fulfilledCallbacks_2 = self.fulfilledCallbacks
|
|
711
|
-
____self_fulfilledCallbacks_2[#____self_fulfilledCallbacks_2 + 1] = function(____, v) return resolve(nil, v) end
|
|
712
|
-
end
|
|
713
|
-
if onRejected then
|
|
714
|
-
local internalCallback = self:createPromiseResolvingCallback(onRejected, resolve, reject)
|
|
715
|
-
local ____self_rejectedCallbacks_3 = self.rejectedCallbacks
|
|
716
|
-
____self_rejectedCallbacks_3[#____self_rejectedCallbacks_3 + 1] = internalCallback
|
|
717
|
-
if isRejected then
|
|
718
|
-
internalCallback(nil, self.rejectionReason)
|
|
719
|
-
end
|
|
720
|
-
else
|
|
721
|
-
local ____self_rejectedCallbacks_4 = self.rejectedCallbacks
|
|
722
|
-
____self_rejectedCallbacks_4[#____self_rejectedCallbacks_4 + 1] = function(____, err) return reject(nil, err) end
|
|
723
|
-
end
|
|
724
|
-
if isFulfilled then
|
|
725
|
-
resolve(nil, self.value)
|
|
677
|
+
local promise, resolve, reject = makeDeferredPromise()
|
|
678
|
+
self:addCallbacks(
|
|
679
|
+
onFulfilled and self:createPromiseResolvingCallback(onFulfilled, resolve, reject) or resolve,
|
|
680
|
+
onRejected and self:createPromiseResolvingCallback(onRejected, resolve, reject) or reject
|
|
681
|
+
)
|
|
682
|
+
return promise
|
|
683
|
+
end
|
|
684
|
+
function __TS__Promise.prototype.addCallbacks(self, fulfilledCallback, rejectedCallback)
|
|
685
|
+
if self.state == 1 then
|
|
686
|
+
return fulfilledCallback(nil, self.value)
|
|
726
687
|
end
|
|
727
|
-
if
|
|
728
|
-
|
|
688
|
+
if self.state == 2 then
|
|
689
|
+
return rejectedCallback(nil, self.rejectionReason)
|
|
729
690
|
end
|
|
730
|
-
|
|
691
|
+
local ____self_fulfilledCallbacks_0 = self.fulfilledCallbacks
|
|
692
|
+
____self_fulfilledCallbacks_0[#____self_fulfilledCallbacks_0 + 1] = fulfilledCallback
|
|
693
|
+
local ____self_rejectedCallbacks_1 = self.rejectedCallbacks
|
|
694
|
+
____self_rejectedCallbacks_1[#____self_rejectedCallbacks_1 + 1] = rejectedCallback
|
|
731
695
|
end
|
|
732
696
|
function __TS__Promise.prototype.catch(self, onRejected)
|
|
733
697
|
return self["then"](self, nil, onRejected)
|
|
734
698
|
end
|
|
735
699
|
function __TS__Promise.prototype.finally(self, onFinally)
|
|
736
700
|
if onFinally then
|
|
737
|
-
local
|
|
738
|
-
|
|
701
|
+
local ____self_finallyCallbacks_2 = self.finallyCallbacks
|
|
702
|
+
____self_finallyCallbacks_2[#____self_finallyCallbacks_2 + 1] = onFinally
|
|
739
703
|
if self.state ~= 0 then
|
|
740
704
|
onFinally(nil)
|
|
741
705
|
end
|
|
742
706
|
end
|
|
743
707
|
return self
|
|
744
708
|
end
|
|
745
|
-
function __TS__Promise.prototype.resolve(self,
|
|
746
|
-
if
|
|
747
|
-
|
|
748
|
-
data,
|
|
709
|
+
function __TS__Promise.prototype.resolve(self, value)
|
|
710
|
+
if isPromiseLike(value) then
|
|
711
|
+
return value:addCallbacks(
|
|
749
712
|
function(____, v) return self:resolve(v) end,
|
|
750
713
|
function(____, err) return self:reject(err) end
|
|
751
714
|
)
|
|
752
|
-
return
|
|
753
715
|
end
|
|
754
716
|
if self.state == 0 then
|
|
755
717
|
self.state = 1
|
|
756
|
-
self.value =
|
|
757
|
-
|
|
758
|
-
callback(nil, data)
|
|
759
|
-
end
|
|
760
|
-
for ____, callback in ipairs(self.finallyCallbacks) do
|
|
761
|
-
callback(nil)
|
|
762
|
-
end
|
|
718
|
+
self.value = value
|
|
719
|
+
return self:invokeCallbacks(self.fulfilledCallbacks, value)
|
|
763
720
|
end
|
|
764
721
|
end
|
|
765
722
|
function __TS__Promise.prototype.reject(self, reason)
|
|
766
723
|
if self.state == 0 then
|
|
767
724
|
self.state = 2
|
|
768
725
|
self.rejectionReason = reason
|
|
769
|
-
|
|
770
|
-
|
|
726
|
+
return self:invokeCallbacks(self.rejectedCallbacks, reason)
|
|
727
|
+
end
|
|
728
|
+
end
|
|
729
|
+
function __TS__Promise.prototype.invokeCallbacks(self, callbacks, value)
|
|
730
|
+
local callbacksLength = #callbacks
|
|
731
|
+
local finallyCallbacks = self.finallyCallbacks
|
|
732
|
+
local finallyCallbacksLength = #finallyCallbacks
|
|
733
|
+
if callbacksLength ~= 0 then
|
|
734
|
+
for i = 1, callbacksLength - 1 do
|
|
735
|
+
callbacks[i](callbacks, value)
|
|
771
736
|
end
|
|
772
|
-
|
|
773
|
-
|
|
737
|
+
if finallyCallbacksLength == 0 then
|
|
738
|
+
return callbacks[callbacksLength](callbacks, value)
|
|
774
739
|
end
|
|
740
|
+
callbacks[callbacksLength](callbacks, value)
|
|
741
|
+
end
|
|
742
|
+
if finallyCallbacksLength ~= 0 then
|
|
743
|
+
for i = 1, finallyCallbacksLength - 1 do
|
|
744
|
+
finallyCallbacks[i](finallyCallbacks)
|
|
745
|
+
end
|
|
746
|
+
return finallyCallbacks[finallyCallbacksLength](finallyCallbacks)
|
|
775
747
|
end
|
|
776
748
|
end
|
|
777
749
|
function __TS__Promise.prototype.createPromiseResolvingCallback(self, f, resolve, reject)
|
|
778
750
|
return function(____, value)
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
end
|
|
783
|
-
local ____try, ____hasReturned = pcall(function()
|
|
784
|
-
self:handleCallbackData(
|
|
785
|
-
f(nil, value),
|
|
786
|
-
resolve,
|
|
787
|
-
reject
|
|
788
|
-
)
|
|
789
|
-
end)
|
|
790
|
-
if not ____try then
|
|
791
|
-
____catch(____hasReturned)
|
|
792
|
-
end
|
|
751
|
+
local success, resultOrError = ____pcall(f, nil, value)
|
|
752
|
+
if not success then
|
|
753
|
+
return reject(nil, resultOrError)
|
|
793
754
|
end
|
|
755
|
+
return self:handleCallbackValue(resultOrError, resolve, reject)
|
|
794
756
|
end
|
|
795
757
|
end
|
|
796
|
-
function __TS__Promise.prototype.
|
|
797
|
-
if isPromiseLike(
|
|
798
|
-
local nextpromise =
|
|
758
|
+
function __TS__Promise.prototype.handleCallbackValue(self, value, resolve, reject)
|
|
759
|
+
if isPromiseLike(value) then
|
|
760
|
+
local nextpromise = value
|
|
799
761
|
if nextpromise.state == 1 then
|
|
800
|
-
resolve(nil, nextpromise.value)
|
|
762
|
+
return resolve(nil, nextpromise.value)
|
|
801
763
|
elseif nextpromise.state == 2 then
|
|
802
|
-
reject(nil, nextpromise.rejectionReason)
|
|
764
|
+
return reject(nil, nextpromise.rejectionReason)
|
|
803
765
|
else
|
|
804
|
-
|
|
766
|
+
return nextpromise:addCallbacks(resolve, reject)
|
|
805
767
|
end
|
|
806
768
|
else
|
|
807
|
-
resolve(nil,
|
|
769
|
+
return resolve(nil, value)
|
|
808
770
|
end
|
|
809
771
|
end
|
|
810
772
|
end
|
|
811
773
|
|
|
812
|
-
local
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
774
|
+
local __TS__AsyncAwaiter, __TS__Await
|
|
775
|
+
do
|
|
776
|
+
local cocreate = coroutine.create
|
|
777
|
+
local coresume = coroutine.resume
|
|
778
|
+
local costatus = coroutine.status
|
|
779
|
+
local coyield = coroutine.yield
|
|
780
|
+
function __TS__AsyncAwaiter(generator)
|
|
781
|
+
return __TS__New(
|
|
782
|
+
__TS__Promise,
|
|
783
|
+
function(____, resolve, reject)
|
|
784
|
+
local fulfilled, step, resolved, asyncCoroutine
|
|
785
|
+
function fulfilled(self, value)
|
|
786
|
+
local success, resultOrError = coresume(asyncCoroutine, value)
|
|
787
|
+
if success then
|
|
788
|
+
return step(resultOrError)
|
|
789
|
+
end
|
|
790
|
+
return reject(nil, resultOrError)
|
|
826
791
|
end
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
792
|
+
function step(result)
|
|
793
|
+
if resolved then
|
|
794
|
+
return
|
|
795
|
+
end
|
|
796
|
+
if costatus(asyncCoroutine) == "dead" then
|
|
797
|
+
return resolve(nil, result)
|
|
798
|
+
end
|
|
799
|
+
return __TS__Promise.resolve(result):addCallbacks(fulfilled, reject)
|
|
831
800
|
end
|
|
832
|
-
|
|
833
|
-
|
|
801
|
+
resolved = false
|
|
802
|
+
asyncCoroutine = cocreate(generator)
|
|
803
|
+
local success, resultOrError = coresume(
|
|
804
|
+
asyncCoroutine,
|
|
805
|
+
function(____, v)
|
|
806
|
+
resolved = true
|
|
807
|
+
return __TS__Promise.resolve(v):addCallbacks(resolve, reject)
|
|
808
|
+
end
|
|
809
|
+
)
|
|
810
|
+
if success then
|
|
811
|
+
return step(resultOrError)
|
|
834
812
|
else
|
|
835
|
-
|
|
836
|
-
____self_0["then"](____self_0, fulfilled, reject)
|
|
813
|
+
return reject(nil, resultOrError)
|
|
837
814
|
end
|
|
838
815
|
end
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
resolved = true
|
|
845
|
-
local ____self_1 = adopt(nil, v)
|
|
846
|
-
____self_1["then"](____self_1, resolve, reject)
|
|
847
|
-
end
|
|
848
|
-
)
|
|
849
|
-
if success then
|
|
850
|
-
step(nil, resultOrError)
|
|
851
|
-
else
|
|
852
|
-
reject(nil, resultOrError)
|
|
853
|
-
end
|
|
854
|
-
end
|
|
855
|
-
)
|
|
856
|
-
end
|
|
857
|
-
local function __TS__Await(thing)
|
|
858
|
-
return coroutine.yield(thing)
|
|
816
|
+
)
|
|
817
|
+
end
|
|
818
|
+
function __TS__Await(thing)
|
|
819
|
+
return coyield(thing)
|
|
820
|
+
end
|
|
859
821
|
end
|
|
860
822
|
|
|
861
823
|
local function __TS__ClassExtends(target, base)
|
|
@@ -953,20 +915,17 @@ local function __TS__ObjectGetOwnPropertyDescriptor(object, key)
|
|
|
953
915
|
return rawget(metatable, "_descriptors")[key]
|
|
954
916
|
end
|
|
955
917
|
|
|
956
|
-
local
|
|
918
|
+
local __TS__DescriptorGet
|
|
957
919
|
do
|
|
958
|
-
local
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
return value
|
|
962
|
-
end
|
|
963
|
-
local metatable = getmetatable(self)
|
|
920
|
+
local getmetatable = _G.getmetatable
|
|
921
|
+
local ____rawget = _G.rawget
|
|
922
|
+
function __TS__DescriptorGet(self, metatable, key)
|
|
964
923
|
while metatable do
|
|
965
|
-
local rawResult =
|
|
924
|
+
local rawResult = ____rawget(metatable, key)
|
|
966
925
|
if rawResult ~= nil then
|
|
967
926
|
return rawResult
|
|
968
927
|
end
|
|
969
|
-
local descriptors =
|
|
928
|
+
local descriptors = ____rawget(metatable, "_descriptors")
|
|
970
929
|
if descriptors then
|
|
971
930
|
local descriptor = descriptors[key]
|
|
972
931
|
if descriptor ~= nil then
|
|
@@ -979,10 +938,16 @@ do
|
|
|
979
938
|
metatable = getmetatable(metatable)
|
|
980
939
|
end
|
|
981
940
|
end
|
|
982
|
-
|
|
983
|
-
|
|
941
|
+
end
|
|
942
|
+
|
|
943
|
+
local __TS__DescriptorSet
|
|
944
|
+
do
|
|
945
|
+
local getmetatable = _G.getmetatable
|
|
946
|
+
local ____rawget = _G.rawget
|
|
947
|
+
local rawset = _G.rawset
|
|
948
|
+
function __TS__DescriptorSet(self, metatable, key, value)
|
|
984
949
|
while metatable do
|
|
985
|
-
local descriptors =
|
|
950
|
+
local descriptors = ____rawget(metatable, "_descriptors")
|
|
986
951
|
if descriptors then
|
|
987
952
|
local descriptor = descriptors[key]
|
|
988
953
|
if descriptor ~= nil then
|
|
@@ -1004,6 +969,26 @@ do
|
|
|
1004
969
|
end
|
|
1005
970
|
rawset(self, key, value)
|
|
1006
971
|
end
|
|
972
|
+
end
|
|
973
|
+
|
|
974
|
+
local __TS__SetDescriptor
|
|
975
|
+
do
|
|
976
|
+
local getmetatable = _G.getmetatable
|
|
977
|
+
local function descriptorIndex(self, key)
|
|
978
|
+
return __TS__DescriptorGet(
|
|
979
|
+
self,
|
|
980
|
+
getmetatable(self),
|
|
981
|
+
key
|
|
982
|
+
)
|
|
983
|
+
end
|
|
984
|
+
local function descriptorNewIndex(self, key, value)
|
|
985
|
+
return __TS__DescriptorSet(
|
|
986
|
+
self,
|
|
987
|
+
getmetatable(self),
|
|
988
|
+
key,
|
|
989
|
+
value
|
|
990
|
+
)
|
|
991
|
+
end
|
|
1007
992
|
function __TS__SetDescriptor(target, key, desc, isPrototype)
|
|
1008
993
|
if isPrototype == nil then
|
|
1009
994
|
isPrototype = false
|
|
@@ -1232,6 +1217,18 @@ local function __TS__DelegatedYield(iterable)
|
|
|
1232
1217
|
end
|
|
1233
1218
|
end
|
|
1234
1219
|
|
|
1220
|
+
local function __TS__FunctionBind(fn, ...)
|
|
1221
|
+
local boundArgs = {...}
|
|
1222
|
+
return function(____, ...)
|
|
1223
|
+
local args = {...}
|
|
1224
|
+
__TS__ArrayUnshift(
|
|
1225
|
+
args,
|
|
1226
|
+
__TS__Unpack(boundArgs)
|
|
1227
|
+
)
|
|
1228
|
+
return fn(__TS__Unpack(args))
|
|
1229
|
+
end
|
|
1230
|
+
end
|
|
1231
|
+
|
|
1235
1232
|
local __TS__Generator
|
|
1236
1233
|
do
|
|
1237
1234
|
local function generatorIterator(self)
|
|
@@ -2551,6 +2548,8 @@ return {
|
|
|
2551
2548
|
__TS__DecorateParam = __TS__DecorateParam,
|
|
2552
2549
|
__TS__Delete = __TS__Delete,
|
|
2553
2550
|
__TS__DelegatedYield = __TS__DelegatedYield,
|
|
2551
|
+
__TS__DescriptorGet = __TS__DescriptorGet,
|
|
2552
|
+
__TS__DescriptorSet = __TS__DescriptorSet,
|
|
2554
2553
|
Error = Error,
|
|
2555
2554
|
RangeError = RangeError,
|
|
2556
2555
|
ReferenceError = ReferenceError,
|
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
/** The default fire delay is represented in the tear stat, not the `MaxFireDelay` value. */
|
|
2
|
-
export declare const DEFAULT_PLAYER_STAT_MAP: ReadonlyMap<number
|
|
3
|
-
readonly __bitFlagBrand: symbol;
|
|
4
|
-
} & {
|
|
5
|
-
readonly __cacheFlagBrand: symbol;
|
|
6
|
-
}, number>;
|
|
2
|
+
export declare const DEFAULT_PLAYER_STAT_MAP: ReadonlyMap<import("isaac-typescript-definitions").CacheFlag, number>;
|
|
7
3
|
//# sourceMappingURL=defaultPlayerStatMap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultPlayerStatMap.d.ts","sourceRoot":"","sources":["../../src/maps/defaultPlayerStatMap.ts"],"names":[],"mappings":"AAMA,4FAA4F;AAC5F,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"defaultPlayerStatMap.d.ts","sourceRoot":"","sources":["../../src/maps/defaultPlayerStatMap.ts"],"names":[],"mappings":"AAMA,4FAA4F;AAC5F,eAAO,MAAM,uBAAuB,uEAUlC,CAAC"}
|
|
@@ -1,49 +1,13 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
2
|
export declare const DOOR_SLOT_TO_DOOR_SLOT_FLAG: {
|
|
3
|
-
readonly [-1]: BitFlags<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
readonly
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
readonly 1: number & {
|
|
14
|
-
readonly __bitFlagBrand: symbol;
|
|
15
|
-
} & {
|
|
16
|
-
readonly __doorSlotFlagBrand: symbol;
|
|
17
|
-
};
|
|
18
|
-
readonly 2: number & {
|
|
19
|
-
readonly __bitFlagBrand: symbol;
|
|
20
|
-
} & {
|
|
21
|
-
readonly __doorSlotFlagBrand: symbol;
|
|
22
|
-
};
|
|
23
|
-
readonly 3: number & {
|
|
24
|
-
readonly __bitFlagBrand: symbol;
|
|
25
|
-
} & {
|
|
26
|
-
readonly __doorSlotFlagBrand: symbol;
|
|
27
|
-
};
|
|
28
|
-
readonly 4: number & {
|
|
29
|
-
readonly __bitFlagBrand: symbol;
|
|
30
|
-
} & {
|
|
31
|
-
readonly __doorSlotFlagBrand: symbol;
|
|
32
|
-
};
|
|
33
|
-
readonly 5: number & {
|
|
34
|
-
readonly __bitFlagBrand: symbol;
|
|
35
|
-
} & {
|
|
36
|
-
readonly __doorSlotFlagBrand: symbol;
|
|
37
|
-
};
|
|
38
|
-
readonly 6: number & {
|
|
39
|
-
readonly __bitFlagBrand: symbol;
|
|
40
|
-
} & {
|
|
41
|
-
readonly __doorSlotFlagBrand: symbol;
|
|
42
|
-
};
|
|
43
|
-
readonly 7: number & {
|
|
44
|
-
readonly __bitFlagBrand: symbol;
|
|
45
|
-
} & {
|
|
46
|
-
readonly __doorSlotFlagBrand: symbol;
|
|
47
|
-
};
|
|
3
|
+
readonly [-1]: BitFlags<import("isaac-typescript-definitions").DoorSlotFlag>;
|
|
4
|
+
readonly 0: import("isaac-typescript-definitions").DoorSlotFlag;
|
|
5
|
+
readonly 1: import("isaac-typescript-definitions").DoorSlotFlag;
|
|
6
|
+
readonly 2: import("isaac-typescript-definitions").DoorSlotFlag;
|
|
7
|
+
readonly 3: import("isaac-typescript-definitions").DoorSlotFlag;
|
|
8
|
+
readonly 4: import("isaac-typescript-definitions").DoorSlotFlag;
|
|
9
|
+
readonly 5: import("isaac-typescript-definitions").DoorSlotFlag;
|
|
10
|
+
readonly 6: import("isaac-typescript-definitions").DoorSlotFlag;
|
|
11
|
+
readonly 7: import("isaac-typescript-definitions").DoorSlotFlag;
|
|
48
12
|
};
|
|
49
13
|
//# sourceMappingURL=doorSlotToDoorSlotFlag.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doorSlotToDoorSlotFlag.d.ts","sourceRoot":"","sources":["../../src/objects/doorSlotToDoorSlotFlag.ts"],"names":[],"mappings":";AAMA,eAAO,MAAM,2BAA2B
|
|
1
|
+
{"version":3,"file":"doorSlotToDoorSlotFlag.d.ts","sourceRoot":"","sources":["../../src/objects/doorSlotToDoorSlotFlag.ts"],"names":[],"mappings":";AAMA,eAAO,MAAM,2BAA2B;;;;;;;;;;CAUW,CAAC"}
|
package/dist/tsdoc-metadata.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObjectValues.d.ts","sourceRoot":"","sources":["../../src/types/ObjectValues.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export type TupleToIntersection<T extends unknown[]> = T extends [
|
|
2
|
-
infer F,
|
|
3
|
-
...infer R
|
|
4
|
-
] ? F & TupleToIntersection<R> : unknown;
|
|
1
|
+
export type TupleToIntersection<T extends readonly unknown[]> = T extends readonly [infer F, ...infer R] ? F & TupleToIntersection<R> : unknown;
|
|
5
2
|
//# sourceMappingURL=TupleToIntersection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TupleToIntersection.d.ts","sourceRoot":"","sources":["../../src/types/TupleToIntersection.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"TupleToIntersection.d.ts","sourceRoot":"","sources":["../../src/types/TupleToIntersection.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,IAC1D,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,GACpC,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,GAC1B,OAAO,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "87.
|
|
3
|
+
"version": "87.3.0",
|
|
4
4
|
"description": "Helper functions and features for IsaacScript mods.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -37,6 +37,6 @@
|
|
|
37
37
|
"lint": "tsx --tsconfig ./scripts/tsconfig.json ./scripts/lint.mts"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"isaac-typescript-definitions": "^41.
|
|
40
|
+
"isaac-typescript-definitions": "^41.1.0"
|
|
41
41
|
}
|
|
42
42
|
}
|
package/src/functions/math.ts
CHANGED
|
@@ -21,7 +21,7 @@ export function getAngleDifference(angle1: float, angle2: float): float {
|
|
|
21
21
|
* Useful for equally distributing things in a circle pattern.
|
|
22
22
|
*
|
|
23
23
|
* @param centerPos A position that represents the center of the center to get the points from.
|
|
24
|
-
* @param radius The radius of the circle.
|
|
24
|
+
* @param radius The length of the radius of the circle.
|
|
25
25
|
* @param numPoints The number of points on the circumference of the circle to get.
|
|
26
26
|
* @param xMultiplier An optional multiplier to get the points around an oval. Default is 1.
|
|
27
27
|
* @param yMultiplier An optional multiplier to get the points around an oval. Default is 1.
|
package/src/functions/stats.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -179,6 +179,7 @@ export * from "./types/Increment";
|
|
|
179
179
|
export * from "./types/LowercaseKeys";
|
|
180
180
|
export * from "./types/NaturalNumbersLessThan";
|
|
181
181
|
export * from "./types/NaturalNumbersLessThanOrEqualTo";
|
|
182
|
+
export * from "./types/ObjectValues";
|
|
182
183
|
export * from "./types/PickingUpItem";
|
|
183
184
|
export * from "./types/PickupIndex";
|
|
184
185
|
export * from "./types/PlayerIndex";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ObjectValues<T> = T[keyof T];
|