diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-09-29 14:44:37 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-09-29 14:44:37 +0800 |
commit | a7a38de065f5ab570c805c367e0260849ee7ab3d (patch) | |
tree | 115b33af5b7f91c2d88be24eab99fdbf3f6f43d7 /changelog.md | |
parent | b3df71ad1ae706a081411666e1a54973c2490db0 (diff) | |
download | lua-language-server-a7a38de065f5ab570c805c367e0260849ee7ab3d.zip |
resolve #587
Diffstat (limited to 'changelog.md')
-rw-r--r-- | changelog.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/changelog.md b/changelog.md index 6dd5f965..002cee3b 100644 --- a/changelog.md +++ b/changelog.md @@ -10,6 +10,24 @@ + `different-requires` * `NEW` supports `---@CustomClass<string, number>` * `NEW` supports `$/cancelRequest` +* `NEW` supports `EventEmitter` + ```lua + --- @class Emit + --- @field on fun(eventName: string, cb: function) + --- @field on fun(eventName: '"died"', cb: fun(i: integer)) + --- @field on fun(eventName: '"won"', cb: fun(s: string)) + local emit = {} + + emit:on(--[[support autocomplete fr "died" and "won"]]) + + emit:on("died", function (i) + -- should be i: integer + end) + + emit:on('won', function (s) + -- should be s: string + end) + ``` * `CHG` hover: improve showing multi defines * `CHG` hover: improve showing multi comments at enums * `CHG` hint: `Lua.hint.paramName` now supports `Disable`, `Literal` and `All` |