typescript-to-lua 1.6.1 → 1.6.2
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/LuaPrinter.js
CHANGED
|
@@ -142,6 +142,7 @@ class LuaPrinter {
|
|
|
142
142
|
// Inline lualib features
|
|
143
143
|
sourceChunks.push("-- Lua Library inline imports\n");
|
|
144
144
|
sourceChunks.push((0, LuaLib_1.loadInlineLualibFeatures)(file.luaLibFeatures, this.emitHost));
|
|
145
|
+
sourceChunks.push("-- End of Lua Library inline imports\n");
|
|
145
146
|
}
|
|
146
147
|
if (this.options.sourceMapTraceback && !(0, CompilerOptions_1.isBundleEnabled)(this.options)) {
|
|
147
148
|
// In bundle mode the traceback is being generated for the entire file in getBundleResult
|
package/dist/lualib/Promise.lua
CHANGED
|
@@ -74,7 +74,7 @@ do
|
|
|
74
74
|
end
|
|
75
75
|
else
|
|
76
76
|
local ____self_fulfilledCallbacks_2 = self.fulfilledCallbacks
|
|
77
|
-
____self_fulfilledCallbacks_2[#____self_fulfilledCallbacks_2 + 1] = function() return resolve(nil,
|
|
77
|
+
____self_fulfilledCallbacks_2[#____self_fulfilledCallbacks_2 + 1] = function(____, v) return resolve(nil, v) end
|
|
78
78
|
end
|
|
79
79
|
if onRejected then
|
|
80
80
|
local internalCallback = self:createPromiseResolvingCallback(onRejected, resolve, reject)
|
|
@@ -83,6 +83,9 @@ do
|
|
|
83
83
|
if isRejected then
|
|
84
84
|
internalCallback(nil, self.rejectionReason)
|
|
85
85
|
end
|
|
86
|
+
else
|
|
87
|
+
local ____self_rejectedCallbacks_4 = self.rejectedCallbacks
|
|
88
|
+
____self_rejectedCallbacks_4[#____self_rejectedCallbacks_4 + 1] = function(____, err) return reject(nil, err) end
|
|
86
89
|
end
|
|
87
90
|
if isFulfilled then
|
|
88
91
|
resolve(nil, self.value)
|
|
@@ -97,8 +100,8 @@ do
|
|
|
97
100
|
end
|
|
98
101
|
function __TS__Promise.prototype.finally(self, onFinally)
|
|
99
102
|
if onFinally then
|
|
100
|
-
local
|
|
101
|
-
|
|
103
|
+
local ____self_finallyCallbacks_5 = self.finallyCallbacks
|
|
104
|
+
____self_finallyCallbacks_5[#____self_finallyCallbacks_5 + 1] = onFinally
|
|
102
105
|
if self.state ~= 0 then
|
|
103
106
|
onFinally(nil)
|
|
104
107
|
end
|
|
@@ -651,7 +651,7 @@ do
|
|
|
651
651
|
end
|
|
652
652
|
else
|
|
653
653
|
local ____self_fulfilledCallbacks_2 = self.fulfilledCallbacks
|
|
654
|
-
____self_fulfilledCallbacks_2[#____self_fulfilledCallbacks_2 + 1] = function() return resolve(nil,
|
|
654
|
+
____self_fulfilledCallbacks_2[#____self_fulfilledCallbacks_2 + 1] = function(____, v) return resolve(nil, v) end
|
|
655
655
|
end
|
|
656
656
|
if onRejected then
|
|
657
657
|
local internalCallback = self:createPromiseResolvingCallback(onRejected, resolve, reject)
|
|
@@ -660,6 +660,9 @@ do
|
|
|
660
660
|
if isRejected then
|
|
661
661
|
internalCallback(nil, self.rejectionReason)
|
|
662
662
|
end
|
|
663
|
+
else
|
|
664
|
+
local ____self_rejectedCallbacks_4 = self.rejectedCallbacks
|
|
665
|
+
____self_rejectedCallbacks_4[#____self_rejectedCallbacks_4 + 1] = function(____, err) return reject(nil, err) end
|
|
663
666
|
end
|
|
664
667
|
if isFulfilled then
|
|
665
668
|
resolve(nil, self.value)
|
|
@@ -674,8 +677,8 @@ do
|
|
|
674
677
|
end
|
|
675
678
|
function __TS__Promise.prototype.finally(self, onFinally)
|
|
676
679
|
if onFinally then
|
|
677
|
-
local
|
|
678
|
-
|
|
680
|
+
local ____self_finallyCallbacks_5 = self.finallyCallbacks
|
|
681
|
+
____self_finallyCallbacks_5[#____self_finallyCallbacks_5 + 1] = onFinally
|
|
679
682
|
if self.state ~= 0 then
|
|
680
683
|
onFinally(nil)
|
|
681
684
|
end
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "typescript-to-lua",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "A generic TypeScript to Lua transpiler. Write your code in TypeScript and publish Lua!",
|
|
5
5
|
"repository": "https://github.com/TypeScriptToLua/TypeScriptToLua",
|
|
6
6
|
"homepage": "https://typescripttolua.github.io/",
|