Required, but non exported Vector2 Type
zawie opened this issue · comments
Adam Zawierucha commented
Adam Zawierucha commented
wait okay so I imported it `import {Vector2} from 'mafs/typings/math', but it takes 4 parameters???
Steven Petryk commented
Ah, makes sense that this would be confusing. Vector2 is just an array of the form [number, number]
, so you don't have to import anything.
Hopefully this can get cleared up when I consolidate all the types, there won't be confusing types that look like they need to be imported (see #15).
Steven Petryk commented
In other words, a valid Vector2 is any array of two numbers.
Steven Petryk commented
Should be fixed now, thanks to the type rollup.