From 31adc884dbe7de245d7cd0d19f901d2490be77f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 28 Sep 2021 21:35:12 +0800 Subject: #587 --- test/diagnostics/init.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test') 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 fun(eventName: '"died"', cb: fun(i: integer)) +local emit = {} +]] + -- TODO do return end -- cgit v1.2.3