perf: update ts types

pull/2992/head
tanjinzhou 2020-10-13 10:43:39 +08:00
parent 748f8d526d
commit c2994a6629
6 changed files with 14 additions and 14 deletions

View File

@ -39,11 +39,11 @@ export const AlertProps = {
/** Whether Alert can be closed */ /** Whether Alert can be closed */
closable: PropTypes.looseBool, closable: PropTypes.looseBool,
/** Close text to show */ /** Close text to show */
closeText: PropTypes.any, closeText: PropTypes.VNodeChild,
/** Content of Alert */ /** Content of Alert */
message: PropTypes.any, message: PropTypes.VNodeChild,
/** Additional content of Alert */ /** Additional content of Alert */
description: PropTypes.any, description: PropTypes.VNodeChild,
/** Callback when close Alert */ /** Callback when close Alert */
// onClose?: React.MouseEventHandler<HTMLAnchorElement>; // onClose?: React.MouseEventHandler<HTMLAnchorElement>;
/** Trigger when animation ending of Alert */ /** Trigger when animation ending of Alert */
@ -52,8 +52,8 @@ export const AlertProps = {
showIcon: PropTypes.looseBool, showIcon: PropTypes.looseBool,
prefixCls: PropTypes.string, prefixCls: PropTypes.string,
banner: PropTypes.looseBool, banner: PropTypes.looseBool,
icon: PropTypes.any, icon: PropTypes.VNodeChild,
onClose: PropTypes.func, onClose: PropTypes.VNodeChild,
}; };
const Alert = defineComponent({ const Alert = defineComponent({

View File

@ -52,7 +52,7 @@ const AnchorProps = {
showInkInFixed: PropTypes.looseBool.def(false), showInkInFixed: PropTypes.looseBool.def(false),
getContainer: PropTypes.func.def(getDefaultContainer), getContainer: PropTypes.func.def(getDefaultContainer),
wrapperClass: PropTypes.string, wrapperClass: PropTypes.string,
wrapperStyle: PropTypes.object, wrapperStyle: PropTypes.style,
getCurrentAnchor: PropTypes.func, getCurrentAnchor: PropTypes.func,
targetOffset: PropTypes.number, targetOffset: PropTypes.number,
onChange: PropTypes.func, onChange: PropTypes.func,

View File

@ -9,7 +9,7 @@ function noop(..._any: any[]): any {}
const AnchorLinkProps = { const AnchorLinkProps = {
prefixCls: PropTypes.string, prefixCls: PropTypes.string,
href: PropTypes.string.def('#'), href: PropTypes.string.def('#'),
title: PropTypes.any, title: PropTypes.VNodeChild,
target: PropTypes.string, target: PropTypes.string,
}; };

View File

@ -16,7 +16,7 @@ const AutoCompleteProps = {
value: SelectValue, value: SelectValue,
defaultValue: SelectValue, defaultValue: SelectValue,
dataSource: PropTypes.array, dataSource: PropTypes.array,
dropdownMenuStyle: PropTypes.object, dropdownMenuStyle: PropTypes.style,
optionLabelProp: PropTypes.string, optionLabelProp: PropTypes.string,
dropdownMatchSelectWidth: PropTypes.looseBool, dropdownMatchSelectWidth: PropTypes.looseBool,
// onChange?: (value: SelectValue) => void; // onChange?: (value: SelectValue) => void;

View File

@ -154,13 +154,13 @@ const ConfigProvider = defineComponent({
}, },
}); });
export const defaultConfigProvider = { export const defaultConfigProvider: ConfigConsumerProps = {
getPrefixCls: (suffixCls: string, customizePrefixCls?: string) => { getPrefixCls: (suffixCls: string, customizePrefixCls?: string) => {
if (customizePrefixCls) return customizePrefixCls; if (customizePrefixCls) return customizePrefixCls;
return `ant-${suffixCls}`; return `ant-${suffixCls}`;
}, },
renderEmpty: defaultRenderEmpty, renderEmpty: defaultRenderEmpty,
} as any; };
/* istanbul ignore next */ /* istanbul ignore next */
ConfigProvider.install = function(app: App) { ConfigProvider.install = function(app: App) {

View File

@ -16,18 +16,18 @@ const AbstractSelectProps = () => ({
prefixCls: PropTypes.string, prefixCls: PropTypes.string,
size: PropTypes.oneOf(['small', 'large', 'default']), size: PropTypes.oneOf(['small', 'large', 'default']),
showAction: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(String)]), showAction: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(String)]),
notFoundContent: PropTypes.any, notFoundContent: PropTypes.VNodeChild,
transitionName: PropTypes.string, transitionName: PropTypes.string,
choiceTransitionName: PropTypes.string, choiceTransitionName: PropTypes.string,
showSearch: PropTypes.looseBool, showSearch: PropTypes.looseBool,
allowClear: PropTypes.looseBool, allowClear: PropTypes.looseBool,
disabled: PropTypes.looseBool, disabled: PropTypes.looseBool,
tabindex: PropTypes.number, tabindex: PropTypes.number,
placeholder: PropTypes.any, placeholder: PropTypes.VNodeChild,
defaultActiveFirstOption: PropTypes.looseBool, defaultActiveFirstOption: PropTypes.looseBool,
dropdownClassName: PropTypes.string, dropdownClassName: PropTypes.string,
dropdownStyle: PropTypes.any, dropdownStyle: PropTypes.style,
dropdownMenuStyle: PropTypes.any, dropdownMenuStyle: PropTypes.style,
dropdownMatchSelectWidth: PropTypes.looseBool, dropdownMatchSelectWidth: PropTypes.looseBool,
// onSearch: (value: string) => any, // onSearch: (value: string) => any,
filterOption: withUndefined(PropTypes.oneOfType([PropTypes.looseBool, PropTypes.func])), filterOption: withUndefined(PropTypes.oneOfType([PropTypes.looseBool, PropTypes.func])),