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 }