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

View File

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

View File

@@ -1,7 +1,8 @@
{
"private": true,
"scripts": {
"build": "tstl",
"build": "tstl && npm run post-build",
"post-build": "cp dist/test.lua ../test.lua",
"dev": "tstl --watch"
},
"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))