Skip to content

[Feature] support returning tables in starlight plugins ffi #876

Description

@k0d13

Before Requesting

  • I found no existing issue matching my feature request
  • This request is related to Millennium, and not a request for a specific theme/addon

Describe the feature you'd like!

So far it seems as though starlight ffi functions can only return primtive values, as right now trying to return a table will just return null.

---@ffi
function getTable()
  return { a = 1, b = 2 }
end
const out = await backend.getTable()
//        ^? null

And then would also be nice to type these, as both the following currently are unknown

---@return { a: number, b: number }
---@class Result
---@field a number
---@field b number

---@return Result

The latter also nested classes https://discord.com/channels/1102739071085846623/1317682877839970366/1539130724987437146

Anything else?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions