functional

This commit is contained in:
2021-06-23 23:30:07 -05:00
parent 3a4dcbee61
commit 2fc2fdec28
4 changed files with 12 additions and 5 deletions

7
test.lua Normal file
View File

@@ -0,0 +1,7 @@
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
menu.add_feature(
"test",
"action",
0,
function() return ui.notify_above_map("Hello from TypeScript", "", 140) end
)

View File

@@ -3,7 +3,5 @@ menu.add_feature(
"test", "test",
"action", "action",
0, 0,
function() function() return ui.notify_above_map("Hello from TypeScript", "", 140) end
ui.notify_above_map("test", "test tile", 140)
end
) )

View File

@@ -1,7 +1,8 @@
{ {
"private": true, "private": true,
"scripts": { "scripts": {
"build": "tstl", "build": "tstl && npm run post-build",
"post-build": "cp dist/test.lua ../test.lua",
"dev": "tstl --watch" "dev": "tstl --watch"
}, },
"devDependencies": { "devDependencies": {

View File

@@ -1 +1,2 @@
menu.add_feature('test', 'action', 0, () => ui.notify_above_map('from TypeScript', 'Hello', 140)) menu.add_feature('test', 'action', 0, () =>
ui.notify_above_map('Hello from TypeScript', '', 140))