Код: Выделить всё
import React from 'react';
type Button = React.ComponentType;
type Select = React.ComponentType;
declare const button: Button;
declare const select: Select;
type AbstractFilter = Record;
type Props = {
filters: {
[P in keyof T]: {
props: React.ComponentProps;
component: T[P];
}
};
values: Record;
}
const Filter = (props: Props) => {
return ;
}
Код: Выделить всё
values: { [P in keyof T]: string } // values is an object with the same keys as filters
Код: Выделить всё
Подробнее здесь: https://stackoverflow.com/questions/798 ... n-one-type
Мобильная версия