diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e1d3c0c723..f4e8f536f6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## [`master`](https://github.com/elastic/eui/tree/master) -No public interface changes since `11.0.0`. +**Bug fixes** + +- Fixed `EuiIconTip`'s typescript definition ([#1934](https://github.com/elastic/eui/pull/1934)) ## [`11.0.0`](https://github.com/elastic/eui/tree/v11.0.0) diff --git a/src/components/tool_tip/index.d.ts b/src/components/tool_tip/index.d.ts index 5fec0cc8ccc..b741fe96fa7 100644 --- a/src/components/tool_tip/index.d.ts +++ b/src/components/tool_tip/index.d.ts @@ -1,6 +1,6 @@ export { EuiToolTipPopover } from './tool_tip_popover'; import { ReactElement, ReactNode, FunctionComponent } from 'react'; -import { EuiIcon } from '../icon'; +import { EuiIcon, IconType } from '../icon'; import { Omit, PropsOf } from '../common'; declare module '@elastic/eui' { @@ -28,10 +28,15 @@ declare module '@elastic/eui' { export interface EuiIconTipProps { color?: string; - type?: string; + type?: IconType; size?: string; 'aria-label'?: string; - iconProps?: PropsOf; + + // EuiIconTip's `type` is passed to EuiIcon, so we want to exclude `type` from + // iconProps; however, due to TS's bivariant function arguments `type` could be + // passed without any error/feedback so we explicitly set it to `never` type + iconProps?: Omit, 'type'> & { type?: never }; } + export const EuiIconTip: FunctionComponent & EuiIconTipProps>; }