I have a method which is taking object's parameters in the signature. I want to pass the object instead of to many parameters and on the other hand, I don't want to change the existing method's signature because it's being used already at multiple places. so basically I want both the methods. But when I'm trying to write code, it gives me errorDuplicate function implementation
.
getSearchData(fetchData: FetchData,languageCode: string, sorting: string, maxResultCount: number, skipCount: number): Observable<PagedResultDtoOfFetchData> {
getSearchData(dataLevel: number, codeType: number, dataCode: string, descLong: string, languageCode: string, dataParent: string, sorting: string, maxResultCount: number, skipCount: number): Observable<PagedResultDtoOfFetchData> {
FYI dataLevel, codeType, dataCode, descLong, dataParent
are properties of fetchData
.