andymatuschak / orbit

Experimental spaced repetition platform for exploring ideas in memory augmentation and programmable attention
https://withorbit.com
Other
1.71k stars 54 forks source link

Upgrade Typescript to 4.2.4 #207

Closed kirkbyo closed 3 years ago

kirkbyo commented 3 years ago

To use ajv for the upcoming https://github.com/andymatuschak/orbit/issues/184 PR, the latest version of typescript is required. I also went ahead and standardized the typescript version throughout all the packages.

In the process of this upgrade it looks like Typescript is having trouble coercing ActionLog and PromptActionLog as equivalent. Specifically, it looks like the taskParameters of RepetitionActionLog and taskParameters of PromptRepetitionActionLog is the property blocking this equivalency despite them being equivalent in theory. To circumvent this problem a force cast between the two types were introduced in the code.

How I tested this?

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

kirkbyo commented 3 years ago

Okay this PR should be good to go now!

Let me know if you would like the approach revisited. Especially since this does not solve the root of the problem but as you mentioned, hopefully this solution will be short lived.