@absolutejs/absolute 0.19.0-beta.722 → 0.19.0-beta.724
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EnvironmentProviders, Provider } from '@angular/core';
|
|
2
|
-
import type {
|
|
2
|
+
import type { AngularPagePropsOf } from '../../types/angular';
|
|
3
3
|
import { type StreamingSlotEnhancerOptions } from '../core/responseEnhancers';
|
|
4
4
|
type AngularPageRenderOptions = StreamingSlotEnhancerOptions & {
|
|
5
5
|
collectStreamingSlots?: boolean;
|
|
@@ -25,12 +25,9 @@ export type HandleAngularPageRequest = {
|
|
|
25
25
|
<Page = {
|
|
26
26
|
factory: (props: Record<never, never>) => unknown;
|
|
27
27
|
}>(input: AngularPageRequestInput<Page>): Promise<Response>;
|
|
28
|
-
<Props extends Record<string, unknown> = Record<never, never>>(Page: AngularPageImporter<Props>, pagePath: string, indexPath: string, headTag: `<head>${string}</head>` | undefined, ...args: AngularPageHandlerArgs<Props>): Promise<Response>;
|
|
29
28
|
};
|
|
30
|
-
type AngularPageHandlerArgs<Props extends Record<string, unknown>> = HasNoRequiredAngularProps<Props> extends true ? [props?: NoInfer<Props>, options?: AngularPageRenderOptions] : [props: NoInfer<Props>, options?: AngularPageRenderOptions];
|
|
31
29
|
export declare const invalidateAngularSsrCache: () => void;
|
|
32
30
|
export declare function handleAngularPageRequest<Page = {
|
|
33
31
|
factory: (props: Record<never, never>) => unknown;
|
|
34
32
|
}>(input: AngularPageRequestInput<Page>): Promise<Response>;
|
|
35
|
-
export declare function handleAngularPageRequest<Props extends Record<string, unknown> = Record<never, never>>(Page: AngularPageImporter<Props>, pagePath: string, indexPath: string, headTag: `<head>${string}</head>` | undefined, ...args: AngularPageHandlerArgs<Props>): Promise<Response>;
|
|
36
33
|
export {};
|
package/dist/types/angular.d.ts
CHANGED
|
@@ -11,12 +11,9 @@ export type AngularDeps = {
|
|
|
11
11
|
SecurityContext: typeof import('@angular/core').SecurityContext;
|
|
12
12
|
};
|
|
13
13
|
export type AngularPageFactory<Props extends Record<string, unknown> = Record<string, unknown>> = (props: Props) => unknown;
|
|
14
|
-
export type AngularPageImporter<Props extends Record<string, unknown> = Record<string, unknown>> = () => Promise<{
|
|
15
|
-
factory: AngularPageFactory<Props>;
|
|
16
|
-
}>;
|
|
17
14
|
export type AngularPagePropsOf<Page> = Page extends {
|
|
18
15
|
factory: (...args: infer Args) => unknown;
|
|
19
|
-
} ? Args extends [] ? Record<never, never> : Exclude<Args[0], undefined> extends Record<string, unknown> ? Exclude<Args[0], undefined> : Record<never, never> :
|
|
16
|
+
} ? Args extends [] ? Record<never, never> : Exclude<Args[0], undefined> extends Record<string, unknown> ? Exclude<Args[0], undefined> : Record<never, never> : Record<never, never>;
|
|
20
17
|
export type CachedRouteData = {
|
|
21
18
|
props: Record<string, unknown> | undefined;
|
|
22
19
|
headTag: `<head>${string}</head>`;
|
package/package.json
CHANGED