@@ -50,29 +50,29 @@ export abstract class TransactBaseOperation<
5050 * create a condition on given attributePath
5151 * @example req.onlyIfAttribute('age').lt(10)
5252 */
53- onlyIfAttribute < K extends keyof T > ( attributePath : K ) : RequestConditionFunctionTyped < R , T , K >
54- onlyIfAttribute ( attributePath : string ) : RequestConditionFunction < R , T >
53+ onlyIfAttribute < K extends keyof T > ( attributePath : K ) : RequestConditionFunctionTyped < this , T , K >
54+ onlyIfAttribute ( attributePath : string ) : RequestConditionFunction < this , T >
5555 onlyIfAttribute < K extends keyof T > (
5656 attributePath : string | K ,
57- ) : RequestConditionFunction < R , T > | RequestConditionFunctionTyped < R , T , K > {
58- return addCondition < R , T , any > ( 'ConditionExpression' , attributePath , < R > ( < any > this ) , this . metadata )
57+ ) : RequestConditionFunction < this , T > | RequestConditionFunctionTyped < this , T , K > {
58+ return addCondition < this , T , any > ( 'ConditionExpression' , attributePath , this , this . metadata )
5959 }
6060
6161 /**
6262 * add a condition necessary for the transaction to succeed
6363 * @example req.onlyIf(or(attribute('age').lt(10), attribute('age').gt(20)))
6464 */
65- onlyIf ( ...conditionDefFns : ConditionExpressionDefinitionFunction [ ] ) : R {
65+ onlyIf ( ...conditionDefFns : ConditionExpressionDefinitionFunction [ ] ) : this {
6666 const condition = and ( ...conditionDefFns ) ( undefined , this . metadata )
6767 addExpression ( 'ConditionExpression' , condition , this . params )
68- return < R > ( < any > this )
68+ return this
6969 }
7070
7171 /**
7272 * get the item attributes if the condition fails
7373 */
74- returnValuesOnConditionCheckFailure ( value : DynamoDB . ReturnValuesOnConditionCheckFailure ) : R {
74+ returnValuesOnConditionCheckFailure ( value : DynamoDB . ReturnValuesOnConditionCheckFailure ) : this {
7575 this . params . ReturnValuesOnConditionCheckFailure = value
76- return < R > ( < any > this )
76+ return this
7777 }
7878}
0 commit comments