LLS annotations for poki defold sdk#36
Open
H1core wants to merge 1 commit into
Open
Conversation
erikdubbelboer
suggested changes
Apr 28, 2026
| ---Signals that gameplay has stopped. | ||
| function poki_sdk.gameplay_stop() end | ||
|
|
||
| ---Requests a commercial break (ad). The callback is called when the ad finishes. |
Contributor
There was a problem hiding this comment.
Suggested change
| ---Requests a commercial break (ad). The callback is called when the ad finishes. | |
| ---Requests a commercial break (ad). The callback is called when the ad starts and when it finishes. |
| ---@param callback fun(self: userdata, status: number) Called with one of the statuses: `poki_sdk.COMMERCIAL_BREAK_START`, `poki_sdk.COMMERCIAL_BREAK_SUCCESS` | ||
| function poki_sdk.commercial_break(callback) end | ||
|
|
||
| ---Requests a rewarded break (rewarded ad). The callback is called when the ad finishes. |
Contributor
There was a problem hiding this comment.
Suggested change
| ---Requests a rewarded break (rewarded ad). The callback is called when the ad finishes. | |
| ---Requests a rewarded break (rewarded ad). The callback is called when the ad starts and when it finishes. |
|
|
||
| ---Generates a shareable URL with the given parameters. | ||
| ---@param params table | ||
| ---@param callback function |
Contributor
There was a problem hiding this comment.
This function gets the generated url as parameter.
erikdubbelboer
suggested changes
Apr 28, 2026
Comment on lines
+32
to
+34
| ---@param size string The size of the reward. Accepted values are `"small"`, `"medium"` and `"large"`. Optional, default is `"small"`. | ||
| ---@param callback fun(self: userdata, status: number) Called with one of the statuses: `poki_sdk.REWARDED_BREAK_ERROR`, `poki_sdk.REWARDED_BREAK_START`, `poki_sdk.REWARDED_BREAK_SUCCESS` | ||
| function poki_sdk.rewarded_break(size, callback) end |
Contributor
There was a problem hiding this comment.
I'm not sure how these lua types work. But would it also be possible to add:
function poki_sdk.rewarded_break(callback) endSo that editors can suggest and validate both ways to call the function?
|
|
||
| ---Returns the value of a URL query parameter by key. | ||
| ---@param key string | ||
| ---@return string value |
Contributor
There was a problem hiding this comment.
Can also return nil if there param was not found.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This repository provides Lua Language Server (LLS) annotations for the Poki SDK used with the Defold engine.
The goal is to improve the developer experience in VS Code by enabling:
API autocompletion
Inline documentation (hover tooltips)
Type hints for Poki SDK functions and objects
These annotations do not modify the SDK itself. Instead, they supply metadata that allows the Lua Language Server to better understand the Poki API surface.