Version 4.22.3 of antd has:
declare const Select: (<ValueType = any, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType>(props: SelectProps<ValueType, OptionType> & {
children?: React.ReactNode;
} & {
ref?: React.Ref<BaseSelectRef> | undefined;
}) => React.ReactElement) & {
SECRET_COMBOBOX_MODE_DO_NOT_USE: string;
Option: typeof Option;
OptGroup: typeof OptGroup;
};
This fails to be converted to a Slink component.
See ScalablyTyped/SlinkyDemos#47
There are 2 problems:
- The second
OptionType type parameter
- The outer intersection
This works:
declare const SelectRef: (<ValueType = any>(props: SelectProps<ValueType> & {
children?: React.ReactNode;
} & {
ref?: React.Ref<BaseSelectRef> | undefined;
}) => React.ReactElement);
declare type InternalSelectType = typeof SelectRef;
interface SelectInterface extends InternalSelectType {
SECRET_COMBOBOX_MODE_DO_NOT_USE: string;
Option: typeof Option;
OptGroup: typeof OptGroup;
}
declare const Select: SelectInterface;
Version 4.22.3 of antd has:
This fails to be converted to a Slink component.
See ScalablyTyped/SlinkyDemos#47
There are 2 problems:
OptionTypetype parameterThis works: