@@ -34,8 +34,9 @@ export abstract class ReadManyRequest<
34
34
I extends DynamoDB . QueryInput | DynamoDB . ScanInput ,
35
35
O extends DynamoDB . QueryOutput | DynamoDB . ScanOutput ,
36
36
Z extends QueryResponse < T2 > | ScanResponse < T2 > ,
37
- R extends QueryRequest < T , T2 > | ScanRequest < T , T2 >
38
- > extends StandardRequest < T , T2 , I , ReadManyRequest < T , T2 , I , O , Z , R > > {
37
+ R extends QueryRequest < T , T2 > | ScanRequest < T , T2 > ,
38
+ R2 extends QueryRequest < T , Partial < T > > | ScanRequest < T , Partial < T > >
39
+ > extends StandardRequest < T , T2 , I , ReadManyRequest < T , T2 , I , O , Z , R , R2 > > {
39
40
/** Infinite limit will remove the Limit param from request params when calling ReadManyRequest.limit(ReadManyRequest.INFINITE_LIMIT) */
40
41
static INFINITE_LIMIT = - 1
41
42
@@ -112,7 +113,7 @@ export abstract class ReadManyRequest<
112
113
* Specifies the list of model attributes to be returned from the table instead of returning the entire document
113
114
* @param attributesToGet List of model attributes to be returned
114
115
*/
115
- projectionExpression ( ...attributesToGet : Array < keyof T | string > ) : ReadManyRequest < T , Partial < T > , I , O , Z , R > {
116
+ projectionExpression ( ...attributesToGet : Array < keyof T | string > ) : R2 {
116
117
addProjectionExpressionParam ( attributesToGet , this . params , this . metadata )
117
118
return < any > this
118
119
}
@@ -121,12 +122,12 @@ export abstract class ReadManyRequest<
121
122
* add a condition for propertyPath
122
123
* @example req.whereAttribute('path.to.prop').eq('value')
123
124
*/
124
- whereAttribute < K extends keyof T > ( attributePath : K ) : RequestConditionFunctionTyped < R , T , K >
125
- whereAttribute ( attributePath : string ) : RequestConditionFunction < R , T >
125
+ whereAttribute < K extends keyof T > ( attributePath : K ) : RequestConditionFunctionTyped < this , T , K >
126
+ whereAttribute ( attributePath : string ) : RequestConditionFunction < this , T >
126
127
whereAttribute < K extends keyof T > (
127
128
attributePath : string | K ,
128
- ) : RequestConditionFunction < R , T > | RequestConditionFunctionTyped < R , T , K > {
129
- return addCondition < R , T , any > ( 'FilterExpression' , attributePath , < any > this , this . metadata )
129
+ ) : RequestConditionFunction < this , T > | RequestConditionFunctionTyped < this , T , K > {
130
+ return addCondition < this , T , any > ( 'FilterExpression' , attributePath , this , this . metadata )
130
131
}
131
132
132
133
/**
0 commit comments