MCPcopy Create free account
hub / github.com/DTStack/dt-react-component / isAlertObjectProps

Function isAlertObjectProps

src/utils/index.ts:17–24  ·  view source on GitHub ↗
(banner: BannerPropType)

Source from the content-addressed store, hash-verified

15type BannerPropType = AlertProps['message'] | Omit<AlertProps, 'banner'>;
16
17export function isAlertObjectProps(banner: BannerPropType): banner is Omit<AlertProps, 'banner'> {
18 return (
19 typeof banner === 'object' &&
20 banner !== null &&
21 !React.isValidElement(banner) &&
22 'message' in banner
23 );
24}

Callers 2

DrawerFunction · 0.90
InternalModalFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected