I want to import the CheckboxChangeEvent interface into my typescript file.
Although importing other antd elements is as simple as:
import {Checkbox} from 'antd'
... for the CheckboxChangeEvent after some grepping I resorted to doing:
import {CheckboxChangeEvent} from '../../../node_modules/antd/es/checkbox'
... where of course the number of parent path components (..) depends on how deep I am in my source tree structure. Regardless, this seems to be the only way to make it work.
I've tried:
import {CheckboxChangeEvent} from 'antd/checkbox';
import {CheckboxChangeEvent} from 'antd/checkbox/Checkbox';
... and some other permutations and they all fail.
Is there a better way?