Skip to content

Widget: Better handling of annotations in connection with defaultProps #7562

@Rathoz

Description

@Rathoz

Is your feature request related to a problem? Please describe.
Figure out a way to better handle cases like

---@param props {change: integer?, emphasisThreshold: integer?}
---@return Renderable?
local function PlacementChangeWidget(props)
---@cast props {change: integer, emphasisThreshold: integer}
, where default props make it optional for a caller, but promises that it exists within the function.

Additional context
Maybe using Partial Classes is the only possible way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions