I just have one question. Is it possible to separate methods from properties and signals using typing??
--!strict
local Types = {}
type self = {
_animations: {},
AnimationMode: number,
_humanoid: Humanoid,
_destroyed: boolean,
_joints: {},
_transforms: {},
_jointTrackers: {},
_stepped: RBXScriptConnection | nil,
_descendantAdded: RBXScriptConnection | nil,
_descendantRemoving: RBXScriptConnection | nil,
}
export type Module = { new: (humanoid: Humanoid) -> Animator }
export type Animator = {
AnimationMode: number?;
LoadAnimation: (self:Animator,keyframeSequence: KeyframeSequence) -> AnimationTrack;
Destroy: (self:Animator) -> ();
}
export type AnimationTrack = {
Play: (self:AnimationTrack, fadeTime:number?, weight:number?, speed:number?) -> ();
Stop: (self:AnimationTrack, fadeTime:number?) -> ();
AdjustSpeed: (self:AnimationTrack,speed:number?) -> ();
AdjustWeight: (self:AnimationTrack,weight:number?,fadeTime:number?) -> ();
Name: string?;
Speed: number?;
Weight: number?;
Length: number?;
IsPlaying: BoolValue;
Looped: BoolValue;
Priority: any;
DidLoop: RBXScriptSignal;
Ended: RBXScriptSignal;
Stopped: RBXScriptSignal;
KeyframeReached: RBXScriptSignal;
}
return Types
so I typed the methods I needed using it in another module, but!
It bothers me a lot that writing
Myconstructor(:Animator) putting a period after MyConstructor tells me “you can use methods” (but my methods are made only for “:” ". Is it even possible to fix it?