feat(sys): expose canGoBack for the chrome that offers the control

This commit is contained in:
2026-08-04 20:55:16 -04:00
parent 3f26c4ff10
commit 2fc3abc487
2 changed files with 26 additions and 12 deletions
+10 -6
View File
@@ -36,19 +36,23 @@ function sys.getAppDataPath() end
---@param title string
function sys.setAppTitle(title) end
---Launches /.lua/apps/<path>/main.lua and pushes the current route.
---@param path string App-relative directory path; traversal is rejected.
---@param arg? string Passed to init(arg).
---Launches a route, which main.lua resolves, and pushes the current one.
---@param path string App-relative route; traversal is rejected.
---@param arg? string Passed to main.start(route, arg).
function sys.launch(path, arg) end
---Launches an app path without retaining the current route.
---@param path string App-relative directory path; traversal is rejected.
---@param arg? string Passed to init(arg).
---Launches a route without retaining the current one.
---@param path string App-relative route; traversal is rejected.
---@param arg? string Passed to main.start(route, arg).
function sys.replace(path, arg) end
---Returns to the previous app, or the launcher when history is empty.
function sys.back() end
---Whether sys.back() would return somewhere rather than land on the launcher, which is what chrome needs to decide whether to offer a back control.
---@return boolean
function sys.canGoBack() end
---Returns heap statistics.
---@return integer freeBytes
---@return integer totalBytes