diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-09-28 21:35:12 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-09-28 21:35:12 +0800 |
commit | 31adc884dbe7de245d7cd0d19f901d2490be77f7 (patch) | |
tree | d2db1e048bcc51f8619dbc319c0eb3d83a8ab920 /test/diagnostics/init.lua | |
parent | 29458b6a44674ad2b4b28cb6f81b5d6b0f4a4875 (diff) | |
download | lua-language-server-31adc884dbe7de245d7cd0d19f901d2490be77f7.zip |
#587
Diffstat (limited to 'test/diagnostics/init.lua')
-rw-r--r-- | test/diagnostics/init.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/diagnostics/init.lua b/test/diagnostics/init.lua index bb613112..574d93f9 100644 --- a/test/diagnostics/init.lua +++ b/test/diagnostics/init.lua @@ -1135,6 +1135,23 @@ return { } ]] +TEST [[ +--- @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 = {} +]] + +TEST [[ +--- @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)) +--- @field <!on!> fun(eventName: '"died"', cb: fun(i: integer)) +local emit = {} +]] + -- TODO do return end |