Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f1be248 authored by Simon Chan's avatar Simon Chan
Browse files

chore: prefer top-level type import

Prepare for TypeScript 5.0 verbatimModuleSyntax option
parent 2c5282bc
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
import {
    AdbPacket,
    AdbPacketSerializeStream,
    type AdbBackend,
} from "@yume-chan/adb";
import type { AdbBackend } from "@yume-chan/adb";
import { AdbPacket, AdbPacketSerializeStream } from "@yume-chan/adb";
import type { ReadableStream, WritableStream } from "@yume-chan/stream-extra";
import {
    StructDeserializeStream,
    WrapReadableStream,
    WrapWritableStream,
    pipeFrom,
    type ReadableStream,
    type WritableStream,
} from "@yume-chan/stream-extra";

declare global {
+5 −12
Original line number Diff line number Diff line
import {
    AdbPacketHeader,
    AdbPacketSerializeStream,
    type AdbBackend,
    type AdbPacketData,
    type AdbPacketInit,
} from "@yume-chan/adb";
import type { AdbBackend, AdbPacketData, AdbPacketInit } from "@yume-chan/adb";
import { AdbPacketHeader, AdbPacketSerializeStream } from "@yume-chan/adb";
import type { ReadableWritablePair } from "@yume-chan/stream-extra";
import {
    DuplexStreamFactory,
    ReadableStream,
    WritableStream,
    pipeFrom,
    type ReadableWritablePair,
} from "@yume-chan/stream-extra";
import {
    EMPTY_UINT8_ARRAY,
    type StructDeserializeStream,
} from "@yume-chan/struct";
import type { StructDeserializeStream } from "@yume-chan/struct";
import { EMPTY_UINT8_ARRAY } from "@yume-chan/struct";

/**
 * `classCode`, `subclassCode` and `protocolCode` are required
+2 −5
Original line number Diff line number Diff line
import {
    AdbPacket,
    AdbPacketSerializeStream,
    type AdbBackend,
} from "@yume-chan/adb";
import type { AdbBackend } from "@yume-chan/adb";
import { AdbPacket, AdbPacketSerializeStream } from "@yume-chan/adb";
import {
    DuplexStreamFactory,
    ReadableStream,
+1 −1
Original line number Diff line number Diff line
// cspell: ignore RSASSA

import type { AdbCredentialStore } from "@yume-chan/adb";
import {
    calculateBase64EncodedLength,
    calculatePublicKey,
@@ -7,7 +8,6 @@ import {
    decodeBase64,
    decodeUtf8,
    encodeBase64,
    type AdbCredentialStore,
} from "@yume-chan/adb";

export default class AdbWebCredentialStore implements AdbCredentialStore {
+10 −14
Original line number Diff line number Diff line
import { PromiseResolver } from "@yume-chan/async";
import type { ReadableWritablePair } from "@yume-chan/stream-extra";
import {
    AbortController,
    DecodeUtf8Stream,
    GatherStringStream,
    WritableStream,
    type ReadableWritablePair,
} from "@yume-chan/stream-extra";

import type { AdbCredentialStore } from "./auth.js";
import {
    ADB_DEFAULT_AUTHENTICATORS,
    AdbAuthenticationProcessor,
    type AdbCredentialStore,
} from "./auth.js";
import type { AdbFrameBuffer } from "./commands/index.js";
import {
    AdbPower,
    AdbReverseCommand,
@@ -21,21 +22,16 @@ import {
    escapeArg,
    framebuffer,
    install,
    type AdbFrameBuffer,
} from "./commands/index.js";
import { AdbFeatures } from "./features.js";
import {
    AdbCommand,
    calculateChecksum,
    type AdbPacketData,
    type AdbPacketInit,
} from "./packet.js";
import {
    AdbPacketDispatcher,
    type AdbIncomingSocketHandler,
    type AdbSocket,
    type Closeable,
import type { AdbPacketData, AdbPacketInit } from "./packet.js";
import { AdbCommand, calculateChecksum } from "./packet.js";
import type {
    AdbIncomingSocketHandler,
    AdbSocket,
    Closeable,
} from "./socket/index.js";
import { AdbPacketDispatcher } from "./socket/index.js";
import { decodeUtf8, encodeUtf8 } from "./utils/index.js";

export enum AdbPropKey {
Loading