@@ -226,37 +226,11 @@ export class DynamicBuffer {
226226 * @param encoding The character encoding to use, default from buffer encoding.
227227 * @returns The number of bytes written.
228228 */
229- append ( data : string , length ?: number , encoding ?: BufferEncoding ) : number ;
230-
231- /**
232- * Appends string to this buffer according to the character encoding.
233- *
234- * @param data String to write to buffer.
235- * @param encoding The character encoding to use, default from buffer encoding.
236- * @param length Maximum number of bytes to write, default the length of string.
237- * @returns The number of bytes written.
238- * @deprecated
239- */
240- append ( data : string , encoding ?: BufferEncoding , length ?: number ) : number ;
241-
242229 append (
243230 data : string ,
244- lengthParam ?: number | BufferEncoding ,
245- encodingParam ?: BufferEncoding | number ,
231+ length ?: number ,
232+ encoding ?: BufferEncoding ,
246233 ) : number {
247- let length : number | undefined ;
248- let encoding : BufferEncoding | undefined ;
249-
250- if ( typeof lengthParam === 'number' || typeof encodingParam === 'string' ) {
251- // @ts -ignore
252- length = lengthParam ;
253- // @ts -ignore
254- encoding = encodingParam ;
255- } else {
256- encoding = lengthParam ;
257- length = encodingParam ;
258- }
259-
260234 const count = this . writeData ( data , this . used , length , encoding ) ;
261235 this . used += count ;
262236
0 commit comments