Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore a typecheck warning by using a special declaration #1588

Open
SteelProjectsRBX opened this issue Dec 25, 2024 · 0 comments
Open

Ignore a typecheck warning by using a special declaration #1588

SteelProjectsRBX opened this issue Dec 25, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@SteelProjectsRBX
Copy link

A lot of the times, the type checker can be wrong, you might have forgot to define some types properly, or just want to mute a warning regardless of context.

For example:

local parts = Model:GetChildren():: {BasePart} -- Type Error: Cannot cast '{Instance}' into '{BasePart}' because the types are unrelated

A potentially nice QOL addition would be similar to this: (like CSS's !important):

local parts = Model:GetChildren()::! {BasePart} -- No issue.
@SteelProjectsRBX SteelProjectsRBX added the enhancement New feature or request label Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant