From fa462e47d4bacf6ec36671676c5f67f63a930e1a Mon Sep 17 00:00:00 2001 From: renkei <30912473+renkei@users.noreply.github.com> Date: Sun, 1 Aug 2021 16:48:23 +0200 Subject: [PATCH] fix: cast map.deserializeBinary to any --- src/descriptor.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/descriptor.js b/src/descriptor.js index 69a6034b..af341487 100644 --- a/src/descriptor.js +++ b/src/descriptor.js @@ -1394,9 +1394,14 @@ function createDeserialize( ), ts.factory.createCallExpression( ts.factory.createPropertyAccessExpression( - ts.factory.createPropertyAccessExpression( - pbIdentifier, - "Map" + ts.factory.createParenthesizedExpression( + ts.factory.createAsExpression( + ts.factory.createPropertyAccessExpression( + pbIdentifier, + "Map" + ), + ts.factory.createToken(ts.SyntaxKind.AnyKeyword) + ), ), "deserializeBinary" ), @@ -1806,4 +1811,4 @@ function processDescriptorRecursively( return statements; } -module.exports = { processDescriptorRecursively, createEnum, createNamespace } \ No newline at end of file +module.exports = { processDescriptorRecursively, createEnum, createNamespace }