I'm trying to use ts-xor package that returns a typescript def :
export declare type XOR<T, U> = (T | U) extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
Here is how I'm using it:
/**
* @typedef {import('ts-xor')} XOR
* @typedef {XOR<{
^^^
* small: true
* }, {
* verySmall: true,
* }>} ButtonProps
* @typedef {React.FunctionComponent<ButtonProps>} ButtonComponent
*/
I get :
Type 'XOR' is not generic.ts(2315)