mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +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:
@@ -22,10 +22,6 @@ export const isInsertChange = (
|
||||
change: Change<EditOperation>
|
||||
): change is Change<InsertOperation> => isInsertOperation(change.op)
|
||||
|
||||
export const isCommentChange = (
|
||||
change: Change<CommentOperation>
|
||||
): change is Change<CommentOperation> => isCommentOperation(change.op)
|
||||
|
||||
export const isDeleteChange = (
|
||||
change: Change<EditOperation>
|
||||
): change is Change<DeleteOperation> => isDeleteOperation(change.op)
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
export function cleanupServiceWorker() {
|
||||
try {
|
||||
navigator.serviceWorker
|
||||
.getRegistrations()
|
||||
.catch(() => {
|
||||
// fail silently if permission not given (e.g. SecurityError)
|
||||
return []
|
||||
})
|
||||
.then(registrations => {
|
||||
registrations.forEach(worker => {
|
||||
worker.unregister()
|
||||
})
|
||||
})
|
||||
} catch (e) {
|
||||
// fail silently if service worker are not available (on the navigator)
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ export function getSplitTestVariant(name: string, fallback?: string) {
|
||||
return getMeta('ol-splitTestVariants')?.[name] || fallback
|
||||
}
|
||||
|
||||
/** @knipignore */
|
||||
export function parseIntFromSplitTest(name: string, defaultValue: number) {
|
||||
const v = getMeta('ol-splitTestVariants')?.[name]
|
||||
const n = parseInt(v, 10)
|
||||
|
||||
Reference in New Issue
Block a user