Prevent users from having to use any

This commit is contained in:
Joseph Garrone 2024-02-12 13:27:07 +01:00
parent 4ee0823acb
commit e3e6847c82
2 changed files with 6 additions and 4 deletions

View File

@ -1,10 +1,11 @@
import type { I18n } from "keycloakify/account/i18n"; import type { I18n } from "keycloakify/account/i18n";
import type { TemplateProps, ClassKey } from "keycloakify/account/TemplateProps"; import type { TemplateProps, ClassKey } from "keycloakify/account/TemplateProps";
import type { LazyOrNot } from "keycloakify/tools/LazyOrNot"; import type { LazyOrNot } from "keycloakify/tools/LazyOrNot";
import type { KcContext } from "keycloakify/account/kcContext";
export type PageProps<KcContext, I18nExtended extends I18n> = { export type PageProps<NarowedKcContext = KcContext, I18nExtended extends I18n = I18n> = {
Template: LazyOrNot<(props: TemplateProps<any, any>) => JSX.Element | null>; Template: LazyOrNot<(props: TemplateProps<any, any>) => JSX.Element | null>;
kcContext: KcContext; kcContext: NarowedKcContext;
i18n: I18nExtended; i18n: I18nExtended;
doUseDefaultCss: boolean; doUseDefaultCss: boolean;
classes?: Partial<Record<ClassKey, string>>; classes?: Partial<Record<ClassKey, string>>;

View File

@ -1,10 +1,11 @@
import type { I18n } from "keycloakify/login/i18n"; import type { I18n } from "keycloakify/login/i18n";
import { type TemplateProps, type ClassKey } from "keycloakify/login/TemplateProps"; import { type TemplateProps, type ClassKey } from "keycloakify/login/TemplateProps";
import type { LazyOrNot } from "keycloakify/tools/LazyOrNot"; import type { LazyOrNot } from "keycloakify/tools/LazyOrNot";
import type { KcContext } from "keycloakify/account/kcContext";
export type PageProps<KcContext, I18nExtended extends I18n> = { export type PageProps<NarowedKcContext = KcContext, I18nExtended extends I18n = I18n> = {
Template: LazyOrNot<(props: TemplateProps<any, any>) => JSX.Element | null>; Template: LazyOrNot<(props: TemplateProps<any, any>) => JSX.Element | null>;
kcContext: KcContext; kcContext: NarowedKcContext;
i18n: I18nExtended; i18n: I18nExtended;
doUseDefaultCss: boolean; doUseDefaultCss: boolean;
classes?: Partial<Record<ClassKey, string>>; classes?: Partial<Record<ClassKey, string>>;