2023-10-24 12:04:07 +01:00
|
|
|
// Copyright (c) Holly Stubbs (tgpholly) - Licensed under MIT
|
|
|
|
// Check LICENSE in repository root for more information.
|
|
|
|
|
2023-04-28 16:47:02 +01:00
|
|
|
export interface IWriter {
|
2023-11-07 00:33:28 +00:00
|
|
|
writeOffset: number,
|
|
|
|
length: number,
|
2023-04-28 16:47:02 +01:00
|
|
|
toBuffer(): Buffer,
|
|
|
|
toString(): string,
|
|
|
|
writeBuffer(buffer:Buffer): IWriter,
|
|
|
|
writeUint8Array(array:Uint8Array): IWriter,
|
|
|
|
writeByte(value:number): IWriter,
|
|
|
|
writeUByte(value:number): IWriter,
|
|
|
|
writeBool(value:boolean|number): IWriter,
|
2024-01-01 22:23:16 +00:00
|
|
|
writeStringAsBytes(text:string): IWriter,
|
2023-04-28 16:47:02 +01:00
|
|
|
writeShort(value:number): IWriter,
|
|
|
|
writeUShort(value:number): IWriter,
|
|
|
|
writeInt(value:number): IWriter,
|
|
|
|
writeUInt(value:number): IWriter,
|
2023-05-02 09:38:23 +01:00
|
|
|
writeLong(value:number|bigint): IWriter,
|
2024-01-01 22:23:16 +00:00
|
|
|
writeULong(value:number|bigint): IWriter,
|
2023-04-28 16:47:02 +01:00
|
|
|
writeFloat(value:number): IWriter,
|
|
|
|
writeDouble(value:number): IWriter,
|
2024-11-26 15:08:21 +00:00
|
|
|
writeUShortString(text:string): IWriter,
|
2023-05-02 10:12:40 +01:00
|
|
|
writeShortString(text:string): IWriter,
|
2024-11-26 15:08:21 +00:00
|
|
|
writeUString(text:string): IWriter,
|
2023-04-28 16:47:02 +01:00
|
|
|
writeString(text:string): IWriter,
|
2024-11-26 15:08:21 +00:00
|
|
|
writeUString16(text:string): IWriter,
|
2023-05-02 10:12:40 +01:00
|
|
|
writeString16(text:string): IWriter,
|
2024-11-26 15:08:21 +00:00
|
|
|
writeStringAsShorts(text:string): IWriter,
|
|
|
|
writeJavaUTF(text:string): IWriter
|
2023-04-28 16:47:02 +01:00
|
|
|
}
|