v3 icon indicating copy to clipboard operation
v3 copied to clipboard

Migrate BlackboardCoreDrawing to use Typescript

Open GreatTA1998 opened this issue 4 years ago • 0 comments

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:

  1. Pull the branch migrate-to-typescript
  2. Fix all compiler warnings for BlackboardCoreDrawing, which requires some wise use of Typescript/Java design patterns.

GreatTA1998 avatar Jun 08 '20 01:06 GreatTA1998