import { expectType } from "tsd"; import vec3, { Vec3 } from ".."; const vec = vec3([1, 2, 3]); expectType(vec); expectType(vec3([1, 2, 3])); expectType(vec3({ x: 1, y: 2, z: 3 })); expectType(vec3("1, 2, 3")); expectType(vec3(1, 2, 3)); expectType(new Vec3(1,2,3)); // @ts-expect-error vec3(1, 2); // @ts-expect-error vec3("1", 2); expectType(vec.x); expectType(vec.y); expectType(vec.z); expectType(vec.set(4, 5, 6)); expectType(vec.update(vec)); expectType(vec.floored()); expectType(vec.floor()); expectType(vec.offset(0, 0, 0)); expectType(vec.translate(0, 0, 0)); expectType(vec.add(vec)); expectType(vec.subtract(vec)); expectType(vec.multiply(vec)); expectType(vec.divide(vec)); expectType(vec.plus(vec)); expectType(vec.minus(vec)); expectType(vec.scaled(2)); expectType(vec.abs()); expectType(vec.volume()); expectType(vec.modulus(vec)); expectType(vec.distanceTo(vec)); expectType(vec.distanceSquared(vec)); expectType(vec.equals(vec)); expectType(vec.toString()); expectType(vec.clone()); expectType(vec.min(vec)); expectType(vec.max(vec)); expectType(vec.norm()); expectType(vec.dot(vec)); expectType(vec.cross(vec)); expectType(vec.unit()); expectType(vec.normalize()); expectType(vec.scale(2)); expectType(vec.xyDistanceTo(vec)); expectType(vec.xzDistanceTo(vec)); expectType(vec.yzDistanceTo(vec)); expectType(vec.innerProduct(vec)); expectType(vec.manhattanDistanceTo(vec)); expectType<[number, number, number]>(vec.toArray());