mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #28760 from overleaf/dp-hackathon-knip
Add Knip and remove a bunch of unused code GitOrigin-RevId: 42ab99fc65973c883d2361e0027e7181767e714e
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
import { debugConsole } from '@/utils/debugging'
|
||||
|
||||
type EditorEvent = { type: string; meta: unknown; date: Date }
|
||||
|
||||
// Record events and then do nothing with them.
|
||||
export class EventLog {
|
||||
private recentEvents: EditorEvent[] = []
|
||||
|
||||
pushEvent = (type: string, meta: unknown = {}) => {
|
||||
debugConsole.log('event', type, meta)
|
||||
this.recentEvents.push({ type, meta, date: new Date() })
|
||||
if (this.recentEvents.length > 100) {
|
||||
return this.recentEvents.shift()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user