refactor: extract common types to @yume-chan/async package

This commit is contained in:
Simon Chan 2024-11-20 06:37:09 +08:00
parent 6cb0a589fa
commit db8466f6ee
No known key found for this signature in database
GPG key ID: A8B69F750B9BCEDD
58 changed files with 337 additions and 267 deletions

View file

@ -33,11 +33,12 @@
},
"dependencies": {
"@yume-chan/adb": "workspace:^",
"@yume-chan/async": "^4.0.2",
"@yume-chan/stream-extra": "workspace:^",
"@yume-chan/struct": "workspace:^"
},
"devDependencies": {
"@types/node": "^22.9.0",
"@types/node": "^22.9.1",
"@yume-chan/eslint-config": "workspace:^",
"@yume-chan/tsconfig": "workspace:^",
"prettier": "^3.3.3",

View file

@ -2,12 +2,12 @@ import type { AddressInfo, SocketConnectOpts } from "net";
import { Server, Socket } from "net";
import type { AdbIncomingSocketHandler, AdbServerClient } from "@yume-chan/adb";
import type { MaybePromiseLike } from "@yume-chan/async";
import {
MaybeConsumable,
PushReadableStream,
tryClose,
} from "@yume-chan/stream-extra";
import type { MaybePromiseLike } from "@yume-chan/struct";
function nodeSocketToConnection(
socket: Socket,