@@ -34,8 +34,9 @@ export abstract class ReadManyRequest<
3434 I extends DynamoDB . QueryInput | DynamoDB . ScanInput ,
3535 O extends DynamoDB . QueryOutput | DynamoDB . ScanOutput ,
3636 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 > > {
3940 /** Infinite limit will remove the Limit param from request params when calling ReadManyRequest.limit(ReadManyRequest.INFINITE_LIMIT) */
4041 static INFINITE_LIMIT = - 1
4142
@@ -112,7 +113,7 @@ export abstract class ReadManyRequest<
112113 * Specifies the list of model attributes to be returned from the table instead of returning the entire document
113114 * @param attributesToGet List of model attributes to be returned
114115 */
115- projectionExpression ( ...attributesToGet : Array < keyof T | string > ) : ReadManyRequest < T , Partial < T > , I , O , Z , R > {
116+ projectionExpression ( ...attributesToGet : Array < keyof T | string > ) : R2 {
116117 addProjectionExpressionParam ( attributesToGet , this . params , this . metadata )
117118 return < any > this
118119 }
@@ -121,12 +122,12 @@ export abstract class ReadManyRequest<
121122 * add a condition for propertyPath
122123 * @example req.whereAttribute('path.to.prop').eq('value')
123124 */
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 >
126127 whereAttribute < K extends keyof T > (
127128 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 )
130131 }
131132
132133 /**
0 commit comments