fix(types): change wrong type of 'types'

This commit is contained in:
Max Baumann
2020-12-13 20:29:23 +01:00
parent e353591a7b
commit d80dad7963
3 changed files with 4 additions and 4 deletions

View File

@@ -1092,7 +1092,7 @@ function createButton(baseID, title, callback, imageName, isDraggable=false): bo
return true;
}
function getControls(): HTMLElement | boolean {
function getControls(): HTMLElement | false {
const controlsSelectors = [
// YouTube
".ytp-right-controls",

View File

@@ -16,7 +16,7 @@ class PreviewBar {
onInvidious: boolean;
timestamps: number[][];
types: string;
types: string[];
constructor(parent: any, onMobileYouTube: boolean, onInvidious: boolean) {
this.container = document.createElement('ul');
@@ -137,7 +137,7 @@ class PreviewBar {
}
}
set(timestamps: number[][], types: string, duration: number): void {
set(timestamps: number[][], types: string[], duration: number): void {
while (this.container.firstChild) {
this.container.removeChild(this.container.firstChild);
}

View File

@@ -24,7 +24,7 @@ class Utils {
}
// Function that can be used to wait for a condition before returning
async wait(condition: () => boolean, timeout = 5000, check = 100): Promise<boolean> {
async wait(condition: () => HTMLElement | boolean, timeout = 5000, check = 100): Promise<HTMLElement | boolean> {
return await new Promise((resolve, reject) => {
setTimeout(() => reject("TIMEOUT"), timeout);