Enable strict mode for extension build

This commit is contained in:
hensm
2020-01-23 00:58:33 +00:00
parent 3553912584
commit 7f84b90431
59 changed files with 526 additions and 331 deletions

View File

@@ -1,5 +1,7 @@
"use strict";
import logger from "./logger";
import { ReceiverSelectorMediaType } from "../background/receiverSelector";
@@ -10,6 +12,8 @@ export function getNextEllipsis (ellipsis: string): string {
if (ellipsis === "..") return "...";
if (ellipsis === "...") return "";
/* tslint:enable:curly */
return "";
}
/**
@@ -79,7 +83,7 @@ export function getMediaTypesForPageUrl (
}
interface WindowCenteredProps {
export interface WindowCenteredProps {
width: number;
height: number;
left: number;
@@ -91,6 +95,11 @@ export function getWindowCenteredProps (
, width: number
, height: number): WindowCenteredProps {
if (refWin.left === undefined || refWin.width === undefined
|| refWin.top === undefined || refWin.height === undefined) {
throw logger.error("refWin missing positional attributes.");
}
const centerX = refWin.left + (refWin.width / 2);
const centerY = refWin.top + (refWin.height / 3);