From 979f91a2e6a8f29c537a174f3ef37bdac05f37d2 Mon Sep 17 00:00:00 2001 From: samrg472 Date: Wed, 3 Jan 2018 00:43:32 -0800 Subject: [PATCH] Fix typos in calculation functions and add missing function (#22614) --- types/bytebuffer/index.d.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/types/bytebuffer/index.d.ts b/types/bytebuffer/index.d.ts index 8456f28182..1ae405815e 100644 --- a/types/bytebuffer/index.d.ts +++ b/types/bytebuffer/index.d.ts @@ -120,12 +120,17 @@ declare class ByteBuffer /** * Calculates the number of UTF8 bytes of a string. */ - static calculateUTF8Byte( str: string ): number; + static calculateUTF8Bytes( str: string ): number; /** * Calculates the number of UTF8 characters of a string.JavaScript itself uses UTF- 16, so that a string's length property does not reflect its actual UTF8 size if it contains code points larger than 0xFFFF. */ - static calculateUTF8Char( str: string ): number; + static calculateUTF8Chars( str: string ): number; + + /** + * Calculates the number of UTF8 bytes of a string. This is an alias of ByteBuffer#calculateUTF8Bytes. + */ + static calculateString( str: string ): number; /** * Calculates the actual number of bytes required to store a 32bit base 128 variable-length integer.