Make type imports explicit

This commit is contained in:
hensm
2022-08-25 22:39:54 +01:00
parent 7a60bb3278
commit 3dcf8552f7
29 changed files with 71 additions and 58 deletions

View File

@@ -11,7 +11,7 @@
} from "../../lib/bridge";
import logger from "../../lib/logger";
import { Options } from "../../lib/options";
import type { Options } from "../../lib/options";
const _ = browser.i18n.getMessage;

View File

@@ -1,10 +1,12 @@
<script lang="ts">
import { tick } from "svelte";
import knownApps, { KnownApp } from "../../cast/knownApps";
import { WhitelistItemData } from "../../background/whitelist";
import type { WhitelistItemData } from "../../background/whitelist";
import { REMOTE_MATCH_PATTERN_REGEX } from "../../lib/matchPattern";
import { Options } from "../../lib/options";
import type { Options } from "../../lib/options";
import knownApps, { KnownApp } from "../../cast/knownApps";
const _ = browser.i18n.getMessage;

View File

@@ -430,7 +430,8 @@
{device}
{isMediaTypeAvailable}
isAnyMediaTypeAvailable={availableMediaTypes !==
ReceiverSelectorMediaType.None && isDeviceCompatible(device)}
ReceiverSelectorMediaType.None &&
isDeviceCompatible(device)}
isAnyConnecting={isConnecting}
on:cast={ev => onReceiverCast(ev.detail.device)}
on:stop={ev => onReceiverStop(ev.detail.device)}

View File

@@ -1,11 +1,14 @@
<script lang="ts">
import { createEventDispatcher, onMount } from "svelte";
import { PlayerState } from "../../cast/sdk/media/enums";
import { SenderMediaMessage, SenderMessage } from "../../cast/sdk/types";
import { ReceiverDevice } from "../../types";
import type { ReceiverDevice } from "../../types";
import type { Port } from "../../messaging";
import { Port } from "../../messaging";
import { PlayerState } from "../../cast/sdk/media/enums";
import type {
SenderMediaMessage,
SenderMessage
} from "../../cast/sdk/types";
import LoadingIndicator from "../LoadingIndicator.svelte";
import ReceiverMedia from "./ReceiverMedia.svelte";

View File

@@ -1,20 +1,21 @@
<script lang="ts">
import { createEventDispatcher, onMount } from "svelte";
import { ReceiverDevice } from "../../types";
import type { ReceiverDevice } from "../../types";
import { MediaStatus, _MediaCommand } from "../../cast/sdk/types";
import { Image, Volume } from "../../cast/sdk/classes";
import type { Image, Volume } from "../../cast/sdk/classes";
import {
MetadataType,
PlayerState,
StreamType,
TrackType
} from "../../cast/sdk/media/enums";
import { getEstimatedTime } from "../../cast/utils";
const _ = browser.i18n.getMessage;
import deviceStore from "./deviceStore";
import { getEstimatedTime } from "../../cast/utils";
const dispatch = createEventDispatcher<{
togglePlayback: void;

View File

@@ -1,4 +1,4 @@
import { writable } from "svelte/store";
import { ReceiverDevice } from "../../types";
import type { ReceiverDevice } from "../../types";
export default writable<ReceiverDevice[]>([]);