|
1 | 1 | # changelog
|
2 | 2 |
|
| 3 | +## 3.8.0 |
| 4 | +`2024-4-22` |
| 5 | +* `NEW` supports tuple type (@[lizho]) |
| 6 | + ```lua |
| 7 | + ---@type [string, number, boolean] |
| 8 | + local t |
| 9 | + |
| 10 | + local x = t[1] --> x is `string` |
| 11 | + local y = t[2] --> y is `number` |
| 12 | + local z = t[3] --> z is `boolean` |
| 13 | + ``` |
| 14 | +* `NEW` generic pattern (@[fesily]) |
| 15 | + ```lua |
| 16 | + ---@generic T |
| 17 | + ---@param t Cat.`T` |
| 18 | + ---@return T |
| 19 | + local function f(t) end |
| 20 | + |
| 21 | + local t = f('Smile') --> t is `Cat.Smile` |
| 22 | + ``` |
| 23 | +* `NEW` alias and enums supports attribute `partial` |
| 24 | + ```lua |
| 25 | + ---@alias Animal Cat |
| 26 | + |
| 27 | + ---@alias(partial) Animal Dog |
| 28 | + |
| 29 | + ---@type Animal |
| 30 | + local animal --> animal is `Cat|Dog` here |
| 31 | + ``` |
| 32 | + |
| 33 | + ```lua |
| 34 | + ---@enum(key) ErrorCodes |
| 35 | + local codes1 = { |
| 36 | + OK = 0, |
| 37 | + ERROR = 1, |
| 38 | + FATAL = 2, |
| 39 | + } |
| 40 | + |
| 41 | + ---@enum(key, partial) ErrorCodes |
| 42 | + local codes2 = { |
| 43 | + WARN = 3, |
| 44 | + INFO = 4, |
| 45 | + } |
| 46 | + |
| 47 | + ---@type ErrorCodes |
| 48 | + local code |
| 49 | + |
| 50 | + code = 'ERROR' --> OK |
| 51 | + code = 'WARN' --> OK |
| 52 | + |
| 53 | + ``` |
| 54 | +* `NEW` plugin: add `OnTransFormAst` interface (@[fesily]) |
| 55 | +* `NEW` plugin: add `OnNodeCompileFunctionParam` interface (@[fesily]) |
| 56 | +* `NEW` plugin: add `ResolveRequire` interface (@[Artem Dzhemesiuk]) |
| 57 | +* `NEW` plugin: support multi plugins (@[fesily]) |
| 58 | + + setting: `Lua.runtime.plugin` can be `string|string[]` |
| 59 | + + setting: `Lua.runtime.pluginArgs` can be `string[]|table<string, string>` |
| 60 | +* `NEW` CLI: `--doc` add option `--doc_out_path <PATH>` (@[Andreas Matthias]) |
| 61 | +* `NEW` CLI: `--doc_update`, update an existing `doc.json` without using `--doc` again (@[Andreas Matthias]) |
| 62 | +* `NEW` CLI: `--trust_all_plugins`, this is potentially unsafe for normal use and meant for usage in CI environments only (@[Paul Emmerich]) |
| 63 | +* `CHG` CLI: `--check` will run plugins (@[Daniel Farrell]) |
| 64 | +* `FIX` diagnostic: `discard-returns` not works in some blocks (@clay-golem) |
| 65 | +* `FIX` rename in library files |
| 66 | + |
3 | 67 | ## 3.7.4
|
4 | 68 | `2024-1-5`
|
5 | 69 | * `FIX` rename to unicode with `Lua.runtime.unicodeName = true`
|
@@ -1963,3 +2027,12 @@ f( -- view comments of `1` and `2` in completion
|
1963 | 2027 | `2020-11-9`
|
1964 | 2028 |
|
1965 | 2029 | * `NEW` implementation, NEW start!
|
| 2030 | + |
| 2031 | +<!-- contributors --> |
| 2032 | +[lizho]: (https://github.com/lizho) |
| 2033 | +[fesily]: (https://github.com/fesily) |
| 2034 | +[Andreas Matthias]: (https://github.com/AndreasMatthias) |
| 2035 | +[Daniel Farrell]: (https://github.com/danpf) |
| 2036 | +[Paul Emmerich]: (https://github.com/emmericp) |
| 2037 | +[Artem Dzhemesiuk]: (https://github.com/zziger) |
| 2038 | +[clay-golem]: (https://github.com/clay-golem) |
0 commit comments