What is the correct way to set typing for object style parameters?
The function signature I have is as follows:
private buildURI({ endpoint params }): void {
}
Typescript is throwing an error for missing typings, so I attempted the following:
private buildURI({ endpoint:string, params: any[] }): void { }
I also tried this approach:
private buildURI({ endpoint, params }: { string, any[]}): void { }
However, neither of these methods worked. The only method that works is:
private buildURI({ endpoint, params }: any ): void { }
Yet, this does not seem to be a valid solution.
So, how can I properly set this method with valid typing?