#Reference to self in Type?
19 messages · Page 1 of 1 (latest)
export type Path = {
Path: Path,
Agent: Model,
Humanoid: Humanoid,
AgentParemeters: {any},
LastTime: number,
Position: {
Count: number,
Last: Vector3
},
Connections: {RBXScriptSignal?},
VisualWaypoints: {BasePart?},
Run: (Vector3) -> nil,
Destroy: () -> nil,
}
I have this type here right
ooh i see
you probably want Destroy: (self: Path) -> nil
in order to reference that it's sending itself
^
Run: (self: Path, argName: Vector3) -> nil
i suggest naming arguments in types
so you know what you're providing exactly
great it picks it up
oh wait you can define the names?
yes
here