Skip to content

SetDragStyleFunction has invalid types - #1369

Open
TheBoogle wants to merge 16 commits into
roblox-ts:masterfrom
TheBoogle:master
Open

TheBoogle wants to merge 16 commits into
roblox-ts:masterfrom
TheBoogle:master

Conversation

@TheBoogle

Copy link
Copy Markdown
Contributor

Unless I am going crazy, according to the documentation and from my own testing, this would be the correct types for SetDragStyleFunction

image

@github-actions

github-actions Bot commented Aug 10, 2025 •

Copy link
Copy Markdown

🛡️ Generated Files Protection

❌ This PR modifies files in include/generated/ which are auto-generated and should NEVER be manually edited.

What you need to do:

  1. Remove the changes to files in include/generated/
  2. Edit include/customDefinitions.d.ts instead to make your changes
  3. These files will be automatically regenerated after your PR is merged

This check will automatically pass once the generated files are removed from your PR.

SetDragStyleFunction(this: UIDragDetector, callback: (inputPosition: UDim2) => UDim2 | void): void;
SetDragStyleFunction(
this: UIDragDetector,
callback: (inputPosition: Vector2) => LuaTuple<[UDim2, number]> | UDim2 | void,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The space of the return values and the relativity of the motion are determined by the DragSpace and DragRelativity properties, unless overridden by returning a specified Enum.UIDragDetectorDragRelativity and Enum.UIDragDetectorDragSpace as the third and fourth return values.

Based on the docs, sounds like we need the tuple to possible supply an optional Enum.UIDragDetectorDragRelativity and Enum.UIDragDetectorDragSpace.

Is this rotation value optional?

Infer collection instance types from validated selectors and support an optional root. Define collection lifecycle callbacks, iteration, and typed instance signal callbacks, with type coverage for callback arguments and invalid signal usage.
Infer collection instance types from validated selectors and support an optional root. Define collection lifecycle callbacks, iteration, and typed instance signal callbacks, with type coverage for callback arguments and invalid signal usage.
Require a Collection<T> receiver for ForEach and Destroy to enforce correct method invocation.
Make InstanceHandle generic and infer its type from the constructor argument so Get and Wait return the specific instance type. Default to Instance for existing type annotations.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants