TS2694
Namespace 'React' has no exported member 'NonExistent'.
Broken Code ❌
import React from 'react';
export type CompositeComponent<P> = React.NonExistent<P>;Fixed Code ✔️
When trying to import a type that is missing in an external namespace, then you have to add the missing typings yourself:
import React from 'react';
declare global {
namespace React {
type NonExistent<P> = React.FunctionComponent<P>;
}
}
export type CompositeComponent<P> = React.NonExistent<P>;