From d5c12bc6dcc8e442889cc41ad90629d2d1690337 Mon Sep 17 00:00:00 2001 From: Junyoung Clare Jang Date: Wed, 29 Aug 2018 18:33:01 -0400 Subject: [PATCH] Fix cryptoHexEncodedHash256 type --- types/evaporate/evaporate-tests.ts | 11 +++++++++++ types/evaporate/index.d.ts | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/types/evaporate/evaporate-tests.ts b/types/evaporate/evaporate-tests.ts index 3140cd9ea9..077cc2ebfd 100644 --- a/types/evaporate/evaporate-tests.ts +++ b/types/evaporate/evaporate-tests.ts @@ -25,3 +25,14 @@ Evaporate.create({ console.log(awsS3ObjectKey + '!!!'); }); }); + +Evaporate.create({ + bucket: 'test', + computeContentMd5: true, + cryptoMd5Method(data: ArrayBuffer) { + return ''; + }, + cryptoHexEncodedHash256(data: ArrayBuffer | string | null) { + return ''; + }, +}); diff --git a/types/evaporate/index.d.ts b/types/evaporate/index.d.ts index 8e959f6b64..8ae110416e 100644 --- a/types/evaporate/index.d.ts +++ b/types/evaporate/index.d.ts @@ -39,7 +39,7 @@ declare namespace Evaporate { onlyRetryForSameFileName?: boolean; timeUrl?: string; cryptoMd5Method?: null | ((data: ArrayBuffer) => string); - cryptoHexEncodedHash256?: null | ((data: ArrayBuffer) => string); + cryptoHexEncodedHash256?: null | ((data: string | ArrayBuffer | null) => string); aws_url?: string; aws_key?: string; awsRegion?: string;