Aws lambda 类型脚本,Lambda处理程序,APIGatewayProxyEvent的类型转换

Aws lambda 类型脚本,Lambda处理程序,APIGatewayProxyEvent的类型转换,aws-lambda,typescript-typings,aws-serverless,Aws Lambda,Typescript Typings,Aws Serverless,我有以下代码,它是Lambda处理程序(无服务器框架)测试的一部分: 我有一个类型错误: TS2352: Conversion of type '{ queryStringParameters: { documentType: PersonalDocumentType; destinationCountry: string; }; }' to type 'APIGatewayProxyEvent' may be a mistake because neither type sufficient

我有以下代码,它是Lambda处理程序(无服务器框架)测试的一部分:

我有一个类型错误:

 TS2352: Conversion of type '{ queryStringParameters: { documentType: PersonalDocumentType; destinationCountry: string; }; }' to type 'APIGatewayProxyEvent' may be a mistake because neither type sufficient
ly overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
      Type '{ queryStringParameters: { documentType: PersonalDocumentType; destinationCountry: string; }; }' is missing the following properties from type 'APIGatewayProxyEventBase<APIGatewayEventDefaultAuthorizerContext>': body, headers, multiValueHeaders, httpMethod
, and 7 more.
TS2352:将类型“{queryStringParameters:{documentType:PersonalDocumentType;destinationCountry:string;};}”转换为类型“APIGatewayProxyEvent”可能是错误的,因为这两种类型都不足够
这两个部分相互重叠。如果这是有意的,请先将表达式转换为“未知”。
类型“{queryStringParameters:{documentType:PersonalDocumentType;destinationCountry:string;};}”缺少类型“APIGatewayProxyEventBase”中的以下属性:正文、标头、多值标头、httpMethod
,还有7个。
似乎我正在创建的
事件
常量需要更多属性,但是如何传递每个属性呢?我认为这不是解决办法。有什么想法吗

 TS2352: Conversion of type '{ queryStringParameters: { documentType: PersonalDocumentType; destinationCountry: string; }; }' to type 'APIGatewayProxyEvent' may be a mistake because neither type sufficient
ly overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
      Type '{ queryStringParameters: { documentType: PersonalDocumentType; destinationCountry: string; }; }' is missing the following properties from type 'APIGatewayProxyEventBase<APIGatewayEventDefaultAuthorizerContext>': body, headers, multiValueHeaders, httpMethod
, and 7 more.