mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 17:51:20 -08:00
refactor(core): CORE-19 type capture and preserve progress lifetimes
This commit is contained in:
1 parent
98a1800032
commit
ccf77c4ed2
49 files changed
+31570
-681
No files matched your search
@@ -0,0 +1,9 @@
|
||||
const revisions = new WeakMap<object, number>()
|
||||
|
||||
export function positionRevision(art: object): number {
|
||||
return revisions.get(art) || 0
|
||||
}
|
||||
|
||||
export function advancePosition(art: object): void {
|
||||
revisions.set(art, positionRevision(art) + 1)
|
||||
}
|
||||
Reference in new issue
Block a user