From 24258211021c0b995ff548521a172acaac11c636 Mon Sep 17 00:00:00 2001 From: Vadim Yakhin Date: Thu, 10 Jun 2021 11:15:27 -0300 Subject: [PATCH] Replace Pick<...> with two separate interfaces as it doesn't work well with our docs --- .../account_management/change_password/change_password.tsx | 5 ++++- .../change_password/change_password_async.tsx | 4 ++-- x-pack/plugins/security/public/ui_api/index.ts | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/security/public/account_management/change_password/change_password.tsx b/x-pack/plugins/security/public/account_management/change_password/change_password.tsx index 8450541aa9fb0a..ac0e284c8b9ad4 100644 --- a/x-pack/plugins/security/public/account_management/change_password/change_password.tsx +++ b/x-pack/plugins/security/public/account_management/change_password/change_password.tsx @@ -19,11 +19,14 @@ import { ChangePasswordForm } from '../../management/users/components/change_pas export interface ChangePasswordProps { user: AuthenticatedUser; +} + +export interface ChangePasswordPropsInternal extends ChangePasswordProps { userAPIClient: PublicMethodsOf; notifications: NotificationsSetup; } -export class ChangePassword extends Component { +export class ChangePassword extends Component { public render() { const canChangePassword = canUserChangePassword(this.props.user); diff --git a/x-pack/plugins/security/public/account_management/change_password/change_password_async.tsx b/x-pack/plugins/security/public/account_management/change_password/change_password_async.tsx index 4dabd2f7b79429..a4ad769146e59c 100644 --- a/x-pack/plugins/security/public/account_management/change_password/change_password_async.tsx +++ b/x-pack/plugins/security/public/account_management/change_password/change_password_async.tsx @@ -14,10 +14,10 @@ import type { ChangePasswordProps } from './change_password'; export const getChangePasswordComponent = async ( core: CoreStart -): Promise>> => { +): Promise> => { const { ChangePassword } = await import('./change_password'); - return (props: Pick) => { + return (props: ChangePasswordProps) => { return ( = (props: T) => ReactElement; export interface UiApi { components: { getPersonalInfo: LazyComponentFn; - getChangePassword: LazyComponentFn>; + getChangePassword: LazyComponentFn; }; }