import BinaryBuffer from '../../../../core/binary/BinaryBuffer'

interface Type<T> extends Function {
    new(...args: any[]): T;
}

export class BinaryClassSerializationAdapter<T> {
    readonly klass: Type<T>;

    readonly version: number;

    initialize(...args: any[]): void;

    finalize(): void;

    serialize(buffer: BinaryBuffer, value: T): void

    deserialize(buffer: BinaryBuffer, value: T): void

    readonly isBinaryClassSerializationAdapter = true;
}