TypeScript cleanup

This commit is contained in:
2018-04-02 07:34:16 +02:00
parent 3f86a970f0
commit 88296da8be
44 changed files with 135 additions and 133 deletions

View File

@ -1,4 +1,5 @@
import { AnimeNotifier } from "../AnimeNotifier"
import AnimeNotifier from "../AnimeNotifier"
import { requestIdleCallback } from "../Utils"
// Load
export function load(arn: AnimeNotifier, element: HTMLElement) {
@ -13,7 +14,7 @@ export function diff(arn: AnimeNotifier, element: HTMLElement) {
arn.diff(url)
.then(() => {
// Avoid instant layout thrashing
arn.requestIdleCallback(() => arn.scrollTo(element))
requestIdleCallback(() => arn.scrollTo(element))
})
.catch(console.error)
}