feat: fix api spec errors

This commit is contained in:
2025-02-04 08:00:00 +08:00
parent 26a06fdbf0
commit f00c1d1aef
7 changed files with 182 additions and 48 deletions

View File

@@ -6,7 +6,10 @@
* found in the LICENSE file at https://angular.dev/license
*/
import type { HttpParameterCodec } from '@ngify/http';
import {
type HttpParameterCodec,
HttpParams as NgifyHttpParams,
} from '@ngify/http';
/**
* Provides encoding and decoding of URL parameter and query-string values.
@@ -298,6 +301,13 @@ export class HttpParams {
);
}
toNgify(): NgifyHttpParams {
this.init();
return new NgifyHttpParams().appendAll(
Object.fromEntries(this.map.entries())
);
}
private clone(update: Update | Update[]): HttpParams {
const clone = new HttpParams({
encoder: this.encoder,