mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-04 18:29:23 +02:00
refactor: impl AdbSocket using internal marks
This commit is contained in:
parent
e36de01d39
commit
bc9bc49e8c
9 changed files with 25 additions and 19 deletions
|
@ -4,7 +4,7 @@ import type { StructAsyncDeserializeStream, StructDeserializeStream, StructField
|
|||
import { StructDefaultOptions, StructValue } from './basic';
|
||||
import { Syncbird } from "./syncbird";
|
||||
import { BigIntFieldDefinition, BigIntFieldType, BufferFieldSubType, FixedLengthBufferLikeFieldDefinition, FixedLengthBufferLikeFieldOptions, LengthField, NumberFieldDefinition, NumberFieldType, StringBufferFieldSubType, Uint8ArrayBufferFieldSubType, VariableLengthBufferLikeFieldDefinition, VariableLengthBufferLikeFieldOptions } from './types';
|
||||
import { Evaluate, Identity, Overwrite, ValueOrPromise } from "./utils";
|
||||
import type { Evaluate, Identity, Overwrite, ValueOrPromise } from "./utils";
|
||||
|
||||
export interface StructLike<TValue> {
|
||||
deserialize(stream: StructDeserializeStream | StructAsyncDeserializeStream): Promise<TValue>;
|
||||
|
@ -212,7 +212,7 @@ export class Struct<
|
|||
> {
|
||||
for (const field of this._fields) {
|
||||
if (field[0] === name) {
|
||||
throw new Error(`This struct already have a field with name '${name}'`);
|
||||
throw new Error(`This struct already have a field with name '${String(name)}'`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue