Fixed most of TypeScript errors for TS 3.1.2

This commit is contained in:
2018-10-10 17:42:23 +09:00
parent d1987e9c60
commit 1829c2cab9
6 changed files with 14 additions and 106 deletions

View File

@ -193,7 +193,7 @@ export default class Application {
this.content.innerHTML = html
}
markActiveLinks(links?: NodeListOf<HTMLAnchorElement>) {
markActiveLinks(links?: HTMLCollectionOf<HTMLAnchorElement>) {
if(!links) {
links = document.getElementsByTagName("a")
}
@ -211,7 +211,7 @@ export default class Application {
}
}
ajaxify(links?: NodeListOf<HTMLAnchorElement>) {
ajaxify(links?: HTMLCollectionOf<HTMLAnchorElement>) {
if(!links) {
links = document.getElementsByTagName("a")
}
@ -241,10 +241,10 @@ export default class Application {
return
}
let url = this.getAttribute("href")
e.preventDefault()
let url = (this as HTMLAnchorElement).getAttribute("href")
if(!url || url === self.currentPath) {
return
}