I user typeScript in GraphQl (in TheQraph project) , this is my entity:
type UserBorrow @entity{
id: ID!
userCollateral: UserCollateral!
market: Market!
balance: BigDecimal!
accumulatedInterest: BigDecimal!
lastBorrowIndexTime: BigInt!
timeStamp: BigInt!
}
and this is my mapping:
userBorrow.balance = userBorrow.balance - event.params.balance.toBigDecimal()
and when ethereum event come,I calculate "userBorrow.balance", I get this error :
TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type
how can I solve this problem?