mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-04 10:19:17 +02:00
chore: enable importsNotUsedAsValues
This commit is contained in:
parent
b287340ac9
commit
2ff723f488
17 changed files with 25 additions and 23 deletions
|
@ -1,4 +1,4 @@
|
|||
import { AdbBackend, ReadableStream, WritableStream } from '@yume-chan/adb';
|
||||
import type { AdbBackend, ReadableStream, WritableStream } from '@yume-chan/adb';
|
||||
|
||||
declare global {
|
||||
interface TCPSocket {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { PromiseResolver } from '@yume-chan/async';
|
||||
import { Disposable } from '@yume-chan/event';
|
||||
import { ValueOrPromise } from '@yume-chan/struct';
|
||||
import type { Disposable } from '@yume-chan/event';
|
||||
import type { ValueOrPromise } from '@yume-chan/struct';
|
||||
import { calculatePublicKey, calculatePublicKeyLength, sign } from './crypto';
|
||||
import { AdbCommand, AdbPacket, AdbPacketCore } from './packet';
|
||||
import { calculateBase64EncodedLength, encodeBase64 } from './utils';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { AutoDisposable } from '@yume-chan/event';
|
||||
import { Adb } from '../adb';
|
||||
import type { Adb } from '../adb';
|
||||
|
||||
export class AdbCommandBase extends AutoDisposable {
|
||||
protected adb: Adb;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Struct from "@yume-chan/struct";
|
||||
import { Adb } from '../adb';
|
||||
import type { Adb } from '../adb';
|
||||
import { AdbBufferedStream } from '../stream';
|
||||
|
||||
const Version =
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Adb } from "../adb";
|
||||
import type { Adb } from "../adb";
|
||||
import { WrapWritableStream, WritableStream } from "../stream";
|
||||
import { escapeArg } from "./subprocess";
|
||||
import { AdbSync } from "./sync";
|
||||
import type { AdbSync } from "./sync";
|
||||
|
||||
export function install(
|
||||
adb: Adb,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Struct from '@yume-chan/struct';
|
||||
import { AdbBufferedStream, WritableStreamDefaultWriter } from '../../stream';
|
||||
import type { AdbBufferedStream, WritableStreamDefaultWriter } from '../../stream';
|
||||
import { AdbSyncRequestId, adbSyncWriteRequest } from './request';
|
||||
import { AdbSyncDoneResponse, adbSyncReadResponse, AdbSyncResponseId } from './response';
|
||||
import { AdbSyncLstatResponse } from './stat';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Struct from '@yume-chan/struct';
|
||||
import { WritableStreamDefaultWriter } from "../../stream";
|
||||
import type { WritableStreamDefaultWriter } from "../../stream";
|
||||
import { encodeUtf8 } from "../../utils";
|
||||
|
||||
export enum AdbSyncRequestId {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Struct, { StructAsyncDeserializeStream, StructLike, StructValueType } from '@yume-chan/struct';
|
||||
import { AdbBufferedStream } from '../../stream';
|
||||
import type { AdbBufferedStream } from '../../stream';
|
||||
import { decodeUtf8 } from "../../utils";
|
||||
|
||||
export enum AdbSyncResponseId {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Struct, { placeholder } from '@yume-chan/struct';
|
||||
import { AdbBufferedStream, WritableStreamDefaultWriter } from '../../stream';
|
||||
import type { AdbBufferedStream, WritableStreamDefaultWriter } from '../../stream';
|
||||
import { AdbSyncRequestId, adbSyncWriteRequest } from './request';
|
||||
import { adbSyncReadResponse, AdbSyncResponseId } from './response';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { AutoDisposable } from '@yume-chan/event';
|
||||
import { Adb } from '../../adb';
|
||||
import type { Adb } from '../../adb';
|
||||
import { AdbFeatures } from '../../features';
|
||||
import { AdbSocket } from '../../socket';
|
||||
import type { AdbSocket } from '../../socket';
|
||||
import { AdbBufferedStream, ReadableStream, WrapReadableStream, WrapWritableStream, WritableStream, WritableStreamDefaultWriter } from '../../stream';
|
||||
import { AutoResetEvent } from '../../utils';
|
||||
import { AdbSyncEntryResponse, adbSyncOpenDir } from './list';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { PromiseResolver } from "@yume-chan/async";
|
||||
import { AdbCommand } from '../packet';
|
||||
import { ChunkStream, DuplexStreamFactory, pipeFrom, PushReadableStreamController, ReadableStream, WritableStream } from '../stream';
|
||||
import { AdbPacketDispatcher } from './dispatcher';
|
||||
import type { AdbPacketDispatcher } from './dispatcher';
|
||||
|
||||
export interface AdbSocketInfo {
|
||||
localId: number;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { ReadableStream, WritableStream } from "../stream";
|
||||
import { AdbSocketController, AdbSocketInfo } from './controller';
|
||||
import type { ReadableStream, WritableStream } from "../stream";
|
||||
import type { AdbSocketController, AdbSocketInfo } from './controller';
|
||||
|
||||
export class AdbSocket implements AdbSocketInfo {
|
||||
private readonly controller: AdbSocketController;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { StructAsyncDeserializeStream } from '@yume-chan/struct';
|
||||
import { AdbSocket, AdbSocketInfo } from '../socket';
|
||||
import { ReadableStream, ReadableStreamDefaultReader } from './detect';
|
||||
import type { StructAsyncDeserializeStream } from '@yume-chan/struct';
|
||||
import type { AdbSocket, AdbSocketInfo } from '../socket';
|
||||
import type { ReadableStream, ReadableStreamDefaultReader } from './detect';
|
||||
import { PushReadableStream } from "./transform";
|
||||
|
||||
export class BufferedStreamEndedError extends Error {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { PromiseResolver } from "@yume-chan/async";
|
||||
import Struct, { StructValueType } from "@yume-chan/struct";
|
||||
import type Struct from "@yume-chan/struct";
|
||||
import type { StructValueType } from "@yume-chan/struct";
|
||||
import { decodeUtf8 } from "../utils";
|
||||
import { BufferedStream, BufferedStreamEndedError } from "./buffered";
|
||||
import { AbortController, AbortSignal, QueuingStrategy, ReadableStream, ReadableStreamController, ReadableStreamDefaultReader, ReadableWritablePair, TransformStream, UnderlyingSink, UnderlyingSource, WritableStream, WritableStreamDefaultWriter } from "./detect";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { PromiseResolver } from '@yume-chan/async';
|
||||
import { Disposable } from '@yume-chan/event';
|
||||
import type { Disposable } from '@yume-chan/event';
|
||||
|
||||
export class AutoResetEvent implements Disposable {
|
||||
private readonly list: PromiseResolver<void>[] = [];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Adb, AdbBufferedStream, AdbSocket } from "@yume-chan/adb";
|
||||
import { Disposable } from "@yume-chan/event";
|
||||
import { ValueOrPromise } from "@yume-chan/struct";
|
||||
import type { Disposable } from "@yume-chan/event";
|
||||
import type { ValueOrPromise } from "@yume-chan/struct";
|
||||
import { delay } from "./utils";
|
||||
|
||||
export interface ScrcpyClientConnectionOptions {
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
"noImplicitThis": true,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"resolveJsonModule": true,
|
||||
"importsNotUsedAsValues": "error",
|
||||
/* Module Resolution Options */
|
||||
"moduleResolution": "Node", // /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
||||
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue