Skip to content

Visualize Your Ideas With Code

fix: explicitly type Vector2.toArray() to return a tuple (#1107)

Rats3c069ce8087e
diff --git a/packages/core/src/types/Vector.ts b/packages/core/src/types/Vector.ts
index e670c1eb..51202fa2 100644
--- a/packages/core/src/types/Vector.ts
+++ b/packages/core/src/types/Vector.ts
@@ -503,7 +503,7 @@ export class Vector2 implements Type, WebGLConvertible {
return `Vector2(${this.x}, ${this.y})`;
}
- public toArray() {
+ public toArray(): [number, number] {
return [this.x, this.y];
}