TS2389
Function implementation name must be 'getOpenPosition'.
Broken Code ❌
async getOpenPosition(): Promise<PortfolioOpenPosition[]>;
async getOpenPosition(id: number): Promise<OrderSchema>;
async getOrder(id?: number) {
const resource = OrderAPI.URL.ORDERS;
const response = await this.apiClient.get(resource);
return z.array(OrderSchema).parse(response.data);
}Solution:
Rename getOrder to getOpenPosition to match the declared method signatures.
Fixed Code ✔️
async getOpenPosition(): Promise<PortfolioOpenPosition[]>;
async getOpenPosition(id: number): Promise<OrderSchema>;
async getOpenPosition(id?: number) {
const resource = OrderAPI.URL.ORDERS;
const response = await this.apiClient.get(resource);
return z.array(OrderSchema).parse(response.data);
}