define type like the Request trait object DynamoAccessor { val documentClient = new AWS.DynamoDB.DocumentClient() @JSExportTopLevel("handleRequest") def handleRequest(req: Request, cx: js.Object, callback: Callback): Unit = { val param = js.Dynamic.literal( "TableName" -> "PriceHistory", "KeyConditionExpression" -> "#ji = :jobid", "ExpressionAttributeNames" -> js.Dynamic.literal("#ji" -> "JobId"), "ExpressionAttributeValues" -> js.Dynamic.literal(":jobid" -> req.jobId) ) documentClient.query( param, (err: js.Object, data: js.Object) => callback(null, data)) } } ܕ҆શʹ͢ΔͳΒɺ3FRVFTUτϨΠτͷΑ͏ʹܕΛఆٛ͢Δ