45
loading...
This website collects cookies to deliver better user experience
_type IdentifierType_ = _string_ | _number_;
@Injectable()
_export abstract class_ CrudService {
_protected_ _url!: _string_;
_protected constructor_(_protected readonly_ _httpClient: HttpClient) {}
_public_ get<ReturnType>(
identifier: _IdentifierType_
): Observable<_Nullable_<ReturnType>> {
...
}
_public delete_(identifier: _IdentifierType_): Observable<_boolean_> {
_..._
}
_public_ post<ReturnType, BodyType = _Partial_<ReturnType>>(
body: BodyType
): Observable<_Nullable_<ReturnType>> {
_..._
}
_public_ getAll<ReturnType>(
filters?: _Record_<_string_, _string_ | _number_>
): Observable<_Nullable_<ReturnType[]>> {
...
}
_public_ put<BodyType>(body: BodyType): Observable<_boolean_> {
...
}
}
@Injectable()
_export class Person_CrudService extends CrudService {
_protected_ _url = '/persons';
_public override delete_(identifier: _number_): Observable<_boolean_> {
_throw new Error('Unsupported Operation');_
}
_public override_ post<Person>(body: Person): Observable<_Nullable_<Person>> {
_throw new Error('Unsupported Operation');_
}
}
@Injectable()
_@UnsupportedOperations<Person_CrudService>('delete', 'post')
_export class Person_ CrudService extends CrudService {
_protected_ _url = '/persons';
}