Skip to content

Commit

Permalink
build: update some types to be compatible with Node v14
Browse files Browse the repository at this point in the history
See http://cl/406111801 with the google3 version of this change.

(cherry picked from commit eeccbcd)
  • Loading branch information
dgp1130 authored and alan-agius4 committed Oct 29, 2021
1 parent a2bd940 commit 8c59dfc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class Chunk {
(this._right ? this._right.length : 0)
);
}
toString(encoding = 'utf-8') {
toString(encoding: BufferEncoding = 'utf-8') {
return (
(this._left ? this._left.toString(encoding) : '') +
(this._content ? this._content.toString(encoding) : '') +
Expand Down Expand Up @@ -234,7 +234,7 @@ export class UpdateBuffer {
return this._originalContent;
}

toString(encoding = 'utf-8'): string {
toString(encoding: BufferEncoding = 'utf-8'): string {
return this._linkedList.reduce((acc, chunk) => acc + chunk.toString(encoding), '');
}
generate(): Buffer {
Expand Down

0 comments on commit 8c59dfc

Please sign in to comment.