So I an calling this in angular
savePat(obj: PatientData): Observable<IJsonSaveResult> {
return this.http.post<IJsonSaveResult>(`${environment.serviceUrl}/patients/addpatient`, obj);
}
my IJsonSaveResult is
export interface IJsonSaveResult {
success: boolean;
errors: any[];
resultSet: any;
}
resultSet can be anything but i want to type it similar to .Net Generics
savePat(obj: PatientData): Observable<IJsonSaveResult(PatientData)> {
return this.http.post<IJsonSaveResult>(`${environment.serviceUrl}/patients/addpatient`, obj);
}
any ideas?