From a72b73a9d439ca9161a45eddd7d707d6d9161c06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Tue, 5 Nov 2019 23:01:39 +0100 Subject: [PATCH] Add missing method to the frida-gum OutputStream typing (#40130) And fix a typo while at it. --- types/frida-gum/index.d.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/types/frida-gum/index.d.ts b/types/frida-gum/index.d.ts index 540135c7a6..c479f9105b 100644 --- a/types/frida-gum/index.d.ts +++ b/types/frida-gum/index.d.ts @@ -1884,7 +1884,7 @@ declare abstract class OutputStream { close(): Promise; /** - * Tries to write `data` to the stream. Returns how how many bytes of `data` were written to the stream. + * Tries to write `data` to the stream. Returns how many bytes of `data` were written to the stream. */ write(data: ArrayBuffer | number[]): Promise; @@ -1894,6 +1894,13 @@ declare abstract class OutputStream { * before the error occurred. */ writeAll(data: ArrayBuffer | number[]): Promise; + + /** + * Tries to write `size` bytes to the stream, reading them from `address`. Returns how many bytes were written + * to the stream. Premature error or end of stream results in an `Error` object with a `partialSize` property + * specifying how many bytes of `data` were written to the stream before the error occurred. + */ + writeMemoryRegion(address: NativePointerValue, size: number): Promise; } /**