warscript 0.0.1-dev.404878c → 0.0.1-dev.aae5649
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.
|
@@ -7,7 +7,7 @@ local ____exports = {}
|
|
|
7
7
|
local ____ability_2Dtype = require("engine.object-data.entry.ability-type")
|
|
8
8
|
local AbilityType = ____ability_2Dtype.AbilityType
|
|
9
9
|
local ____arrays = require("utility.arrays")
|
|
10
|
-
local
|
|
10
|
+
local emptyArray = ____arrays.emptyArray
|
|
11
11
|
local map = ____arrays.map
|
|
12
12
|
local ____buff_2Dtype = require("engine.object-data.entry.buff-type")
|
|
13
13
|
local BuffType = ____buff_2Dtype.BuffType
|
|
@@ -78,7 +78,7 @@ __TS__SetDescriptor(
|
|
|
78
78
|
function(levelAbilityUpgrades)
|
|
79
79
|
return levelAbilityUpgrades[i + 1]
|
|
80
80
|
end
|
|
81
|
-
) or (abilityUpgrades[i + 1] or
|
|
81
|
+
) or (abilityUpgrades[i + 1] or emptyArray())
|
|
82
82
|
)
|
|
83
83
|
end
|
|
84
84
|
end
|
package/exception.d.ts
CHANGED
package/exception.lua
CHANGED
|
@@ -50,4 +50,8 @@ ____exports.CancellationException = __TS__Class()
|
|
|
50
50
|
local CancellationException = ____exports.CancellationException
|
|
51
51
|
CancellationException.name = "CancellationException"
|
|
52
52
|
__TS__ClassExtends(CancellationException, ____exports.Exception)
|
|
53
|
+
____exports.UnsupportedOperationException = __TS__Class()
|
|
54
|
+
local UnsupportedOperationException = ____exports.UnsupportedOperationException
|
|
55
|
+
UnsupportedOperationException.name = "UnsupportedOperationException"
|
|
56
|
+
__TS__ClassExtends(UnsupportedOperationException, ____exports.Exception)
|
|
53
57
|
return ____exports
|
package/package.json
CHANGED
package/utility/arrays.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="@typescript-to-lua/language-extensions" />
|
|
2
2
|
/** @noSelfInFile */
|
|
3
3
|
import { TupleOf } from "./types";
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const emptyArray: <T>() => readonly T[];
|
|
5
5
|
export declare const joinToString: <T>(array: readonly T[], separator: string, transform?: (element: T) => string) => string;
|
|
6
6
|
export declare const arrayOfNotNull: <T>(...elements: readonly (T | null | undefined)[]) => T[];
|
|
7
7
|
export declare const array: <T, N extends number>(length: N, initialize: (index: number) => T) => TupleOf<T, N>;
|
package/utility/arrays.lua
CHANGED
|
@@ -8,7 +8,10 @@ local mathMin = math.min
|
|
|
8
8
|
local select = _G.select
|
|
9
9
|
local tableConcat = table.concat
|
|
10
10
|
local tableSort = table.sort
|
|
11
|
-
|
|
11
|
+
local EMPTY_ARRAY = {}
|
|
12
|
+
____exports.emptyArray = function()
|
|
13
|
+
return EMPTY_ARRAY
|
|
14
|
+
end
|
|
12
15
|
____exports.joinToString = function(array, separator, transform)
|
|
13
16
|
if transform == nil then
|
|
14
17
|
transform = tostring
|