feat: Add toString method to GMLIB_BinaryStream

This commit is contained in:
子沐呀
2024-10-14 18:06:22 +08:00
Unverified
parent 6270ad37fc
commit ac64e23ee7
2 changed files with 11 additions and 0 deletions
+3
View File
@@ -1172,6 +1172,9 @@ declare class GMLIB_BinaryStream {
/** 重置数据包 */ /** 重置数据包 */
reset(): GMLIB_BinaryStream; reset(): GMLIB_BinaryStream;
/** 转换成字符串 */
toString(): string;
/** 写入数据 */ /** 写入数据 */
write( write(
/** 数据 */ /** 数据 */
+8
View File
@@ -2203,6 +2203,14 @@ class GMLIB_BinaryStream {
return this; return this;
} }
/**
* 转换成字符串
* @returns {string} 字符串
*/
toString(){
return `<GMLIB_BinaryStream#${this.#id}>`
}
/** /**
* 写入数据 * 写入数据
* @param {{"type":string,"value":any}[]|{"type":string,"value":any}} value 数据 * @param {{"type":string,"value":any}[]|{"type":string,"value":any}} value 数据