We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a292f71 commit d01cdbfCopy full SHA for d01cdbf
1 file changed
src/LuaTransformer.ts
@@ -3115,7 +3115,9 @@ export class LuaTransformer {
3115
statements.push(
3116
tstl.createAssignmentStatement(lhs.map(i => this.createExportedIdentifier(i)), rhs, parent));
3117
} else {
3118
- if (tsOriginal && tsHelper.findFirstNodeAbove(tsOriginal, ts.isFunctionLike)) {
+ // TODO this check probably should be moved out of this function or be improved?
3119
+ if (tsOriginal &&
3120
+ (ts.isFunctionLike(tsOriginal) || tsHelper.findFirstNodeAbove(tsOriginal, ts.isFunctionLike))) {
3121
// Separate declaration from assignment to allow for recursion
3122
statements.push(tstl.createVariableDeclarationStatement(lhs, undefined, parent));
3123
statements.push(tstl.createAssignmentStatement(lhs, rhs, parent));
0 commit comments