I can get TypeScript hints if I import or create a directive in a SFC file as follows:
import vFocus from 'my-custom-component-library';
Howerver, if I register it globally in main.ts, I cannot get the type hints.
For example:
app.directive('focus', vFocus);
So how can I add type hints if I want to globally install it?
According to the
vue-languageissue 465, currently I can declare the Directives inComponentCustomPropertiesfor global register directives but it may pollution component global properties.