Skip to content

Commit 3ad73bb

Browse files
committed
Changelog 0.32.0
1 parent 2d938b8 commit 3ad73bb

File tree

1 file changed

+28
-16
lines changed

1 file changed

+28
-16
lines changed

CHANGELOG.md

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Changelog
22

3-
## Unreleased
3+
## 0.32.0
4+
5+
- **Deprecated:** The `noHoisting` option has been removed, hoisting will always be done.
46

57
- TypeScript has been updated to 3.8. See [release notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html) for details.
68

@@ -52,26 +54,14 @@
5254

5355
This change simplifies our codebase and opens a path to object accessors implementation
5456

55-
- Errors reported during transpilation now are created as TypeScript diagnostics, instead of being thrown as JavaScript errors. This makes TypeScriptToLua always try to generate valid code (even in presence of errors) and allows multiple errors to be reported in a single file:
57+
- Errors reported during transpilation now are created as TypeScript diagnostics instead of being thrown as JavaScript errors. This makes TypeScriptToLua always try to generate valid code (even in presence of errors) and allows multiple errors to be reported in a single file:
5658

57-
<!-- prettier-ignore -->
5859
```ts
59-
for (var x in []) {}
60-
```
61-
62-
```shell
63-
# Before
64-
65-
$ tstl file.ts
66-
file.ts:1:1 - error TSTL: Iterating over arrays with 'for ... in' is not allowed.
67-
68-
$ cat file.lua
69-
error("Iterating over arrays with 'for ... in' is not allowed.")
60+
for (var x in []) {
61+
}
7062
```
7163

7264
```shell
73-
# Now
74-
7565
$ tstl file.ts
7666
file.ts:1:1 - error TSTL: Iterating over arrays with 'for ... in' is not allowed.
7767
file.ts:1:6 - error TSTL: `var` declarations are not supported. Use `let` or `const` instead.
@@ -91,6 +81,28 @@
9181
}
9282
```
9383
84+
- Added support for all valid TS `for ... of` loop variable patterns.
85+
86+
- Fixed a bug where spread expressions in array literals were not correctly translated:
87+
88+
```diff
89+
- [1, ...[2, 3], 4] // --> { 1, 2, 4 }
90+
+ [1, ...[2, 3], 4] // --> { 1, 2, 3, 4 }
91+
92+
- ((...values) => values)(1, ...[2, 3], 4) // --> { 1, 2, 4 }
93+
+ ((...values) => values)(1, ...[2, 3], 4) // --> { 1, 2, 3, 4 }
94+
```
95+
96+
- Fixed Lua error when left hand side of `instanceof` was not a table type.
97+
98+
- Fixed `sourcemapTraceback` function returning a value different from the standard Lua result in 5.1.
99+
100+
- Fixed missing LuaLib dependency for Error LuaLib function.
101+
102+
- Fixed several issues with exported identifiers breaking `for ... in` loops and some default class code.
103+
104+
- Fixed overflowing numbers transforming to undefined Infinity, instead they are now transformed to `math.huge`.
105+
94106
## 0.31.0
95107
96108
- **Breaking:** The old annotation syntax (`/* !varArg */`) **no longer works**, the only currently supported syntax is:

0 commit comments

Comments
 (0)