build: fix build and add examples
This commit is contained in:
@@ -8,9 +8,13 @@ import {
|
||||
withInterceptors,
|
||||
withLegacyInterceptors,
|
||||
} from '@ngify/http';
|
||||
import { InjectionToken, Optional, type Provider } from 'injection-js';
|
||||
import {
|
||||
InjectionToken,
|
||||
Optional,
|
||||
type Provider,
|
||||
} from '@outposts/injection-js';
|
||||
import type { ArrayOrNullableOne } from '../utils/types';
|
||||
export { HttpParams, HttpParamsOptions } from './params';
|
||||
export { HttpParams, type HttpParamsOptions } from './params';
|
||||
|
||||
export const HTTP_FEATURES = new InjectionToken<HttpFeature[]>('HTTP_FEATURES');
|
||||
|
||||
|
||||
@@ -88,6 +88,7 @@ function paramParser(
|
||||
// The `window.location.search` can be used while creating an instance of the `HttpParams` class
|
||||
// (e.g. `new HttpParams({ fromString: window.location.search })`). The `window.location.search`
|
||||
// may start with the `?` char, so we strip it if it's present.
|
||||
// biome-ignore lint/performance/useTopLevelRegex: <explanation>
|
||||
const params: string[] = rawParams.replace(/^\?/, '').split('&');
|
||||
params.forEach((param: string) => {
|
||||
const eqIdx = param.indexOf('=');
|
||||
@@ -304,7 +305,7 @@ export class HttpParams {
|
||||
toNgify(): NgifyHttpParams {
|
||||
this.init();
|
||||
return new NgifyHttpParams().appendAll(
|
||||
Object.fromEntries(this.map.entries())
|
||||
Object.fromEntries(this.map!.entries())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user