When using calculatePatch today, the resulting patches incorrectly type their entry as DefaultEntry, when ideally the resulting Patch[] would be generic based on the actually tree's being used. Basically something like: Patch<T | K>[]
today:
class FSTree<T> {
calculatePatch<K extends BaseEntry>(theirFSTree: FSTree<K>, isEqual?: (a: T, b: K) => boolean): FSTree.Patch {
}
}
Proposed:
class FSTree<T> {
calculatePatch<K extends BaseEntry>(theirFSTree: FSTree<K>, isEqual?: (a: T, b: K) => boolean): FSTree.Patch<T | K> {
}
}