v3
v3 copied to clipboard
Migrate BlackboardCoreDrawing to use Typescript
Our Blackboard needs to be robust, as it's reused everywhere. Without Typescript, the strokesArray
could contain a stroke with negative coordinates e.g. { x: -1, y: -3 }, or a stroke object without an isErased
property, etc, which leads to subtle bugs that only surface when viewing the DoodleVideo
.
With Typescript, can enforce that the output of Blackboard
is a valid Array<Stroke>
, where Stroke is a clearly defined interface as per our specs.
Steps:
- Pull the branch
migrate-to-typescript
- Fix all compiler warnings for BlackboardCoreDrawing, which requires some wise use of Typescript/Java design patterns.