From ece84eccd79555a889658e731766fda1a827bc11 Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Wed, 28 Oct 2020 10:55:20 -0700 Subject: [PATCH] fix(protocol): annotate file buffer as binary (#4272) --- src/protocol/channels.ts | 4 ++-- src/protocol/protocol.yml | 4 ++-- src/protocol/validator.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/protocol/channels.ts b/src/protocol/channels.ts index e40c252b33..215e9952e1 100644 --- a/src/protocol/channels.ts +++ b/src/protocol/channels.ts @@ -1490,7 +1490,7 @@ export type FrameSetInputFilesParams = { files: { name: string, mimeType: string, - buffer: string, + buffer: Binary, }[], timeout?: number, noWaitAfter?: boolean, @@ -1982,7 +1982,7 @@ export type ElementHandleSetInputFilesParams = { files: { name: string, mimeType: string, - buffer: string, + buffer: Binary, }[], timeout?: number, noWaitAfter?: boolean, diff --git a/src/protocol/protocol.yml b/src/protocol/protocol.yml index eb344adb15..3c03397add 100644 --- a/src/protocol/protocol.yml +++ b/src/protocol/protocol.yml @@ -1243,7 +1243,7 @@ Frame: properties: name: string mimeType: string - buffer: string + buffer: binary timeout: number? noWaitAfter: boolean? @@ -1660,7 +1660,7 @@ ElementHandle: properties: name: string mimeType: string - buffer: string + buffer: binary timeout: number? noWaitAfter: boolean? diff --git a/src/protocol/validator.ts b/src/protocol/validator.ts index f07d9d45fa..8f07d900ea 100644 --- a/src/protocol/validator.ts +++ b/src/protocol/validator.ts @@ -592,7 +592,7 @@ export function createScheme(tChannel: (name: string) => Validator): Scheme { files: tArray(tObject({ name: tString, mimeType: tString, - buffer: tString, + buffer: tBinary, })), timeout: tOptional(tNumber), noWaitAfter: tOptional(tBoolean), @@ -781,7 +781,7 @@ export function createScheme(tChannel: (name: string) => Validator): Scheme { files: tArray(tObject({ name: tString, mimeType: tString, - buffer: tString, + buffer: tBinary, })), timeout: tOptional(tNumber), noWaitAfter: tOptional(tBoolean),