TS1054
TS1054: A
getaccessor cannot have parameters.
Broken Code ❌
get isLong(input: string) {
return this.config.orderPosition === ExchangeOrderPosition.LONG;
}Solution:
To fix this issue, you need to convert the get accessor to a regular method since TypeScript does not allow parameters for getters. This change allows the method to accept arguments as required.
Fixed Code ✔️
isLong(input: string): boolean {
return this.config.orderPosition === ExchangeOrderPosition.LONG;
}