-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
The type def for DetectedEevent should use the class declaration method to allow users to use it in their scripts.
Currently it's a type
type DetectedEvent = {
valid : boolean,
index : number,
can_change_damage : boolean,
AdjustDamage : (self: DetectedEvent, Damage: number) -> nil,
getDamage : (self: DetectedEvent) -> list,
...
}As far as I know without a require import, types cannot be used in a script being checked by luau-lsp.
This results in dreaded red squiggles in code and no predictions
Proposed fix
This may need to be done in part in the viewer project with the xml defs file
declare class DetectedEvent
valid : boolean
index : number
can_change_damage : boolean
function adjustDamage(self): nil
function getDamage(self): list
...
endWill allow users to make use of it properly

HaroldCindy
Metadata
Metadata
Assignees
Labels
No labels