Skip to content

Commit efdff3c

Browse files
authored
Fix: misc type hints, add TakeScreenshot declaration (#9250)
1 parent 3aedb5f commit efdff3c

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

src/HeadlessWrapper.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function imageHandleClass:ImageSize()
4444
end
4545

4646
-- Rendering
47-
function RenderInit() end
47+
function RenderInit(flag, ...) end
4848
function GetScreenSize()
4949
return 1920, 1080
5050
end
@@ -160,6 +160,7 @@ function OpenURL(url) end
160160
function SetProfiling(isEnabled) end
161161
function Restart() end
162162
function Exit() end
163+
function TakeScreenshot() end
163164

164165
local l_require = require
165166
function require(name)

src/Launch.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ end
250250
---Download the given page in the background, and calls the provided callback function when done:
251251
---@param url string
252252
---@param callback fun(response:table, errMsg:string) @ response = { header, body }
253-
---@param params table @ params = { header, body }
253+
---@param params? table @ params = { header, body }
254254
function launch:DownloadPage(url, callback, params)
255255
params = params or {}
256256
local script = [[

src/Modules/BuildSiteTools.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ buildSites.websiteList = {
2929
}
3030

3131
--- Uploads a PoB build code to a website
32-
--- @param websiteInfo Table Contains the postUrl, any postParams, and a prefix to add to the response
33-
--- @param buildCode String The build code that will be uploaded
32+
--- @param websiteInfo table Contains the postUrl, any postParams, and a prefix to add to the response
33+
--- @param buildCode string The build code that will be uploaded
3434
function buildSites.UploadBuild(buildCode, websiteInfo)
3535
local response
3636
if websiteInfo then
@@ -69,9 +69,9 @@ function buildSites.UploadBuild(buildCode, websiteInfo)
6969
end
7070

7171
--- Downloads a PoB build code from a website
72-
--- @param link String A link to the site that contains the link to the raw build code
73-
--- @param websiteInfo Table Contains the downloadUrl
74-
--- @param callback Function The function to call when the download is complete
72+
--- @param link string A link to the site that contains the link to the raw build code
73+
--- @param websiteInfo table? Contains the downloadUrl
74+
--- @param callback function The function to call when the download is complete
7575
function buildSites.DownloadBuild(link, websiteInfo, callback)
7676
local siteCodeURL
7777
-- Only called on program start via protocol handler
@@ -100,10 +100,10 @@ function buildSites.DownloadBuild(link, websiteInfo, callback)
100100
end
101101

102102
-- Parses and converts URI's to import links. Currently only supports protocol handler URI's, extend as needed.
103-
-- @param uri String Example: pob://pobbin/<id> or pob://poeninja/<id>
103+
-- @param uri string Example: pob://pobbin/<id> or pob://poeninja/<id>
104104
function buildSites.ParseImportLinkFromURI(uri)
105105
local importLink = nil
106-
106+
107107
-- Check if it's an URI from protocol handler
108108
for _, siteInfo in ipairs(buildSites.websiteList) do
109109
if uri:match("^pob:[/\\]*" .. siteInfo.id:lower() .. "[/\\]+(.+)") then

0 commit comments

Comments
 (0)