Dafrok/v-hotkey

Is typescript and ssr supported?

gustawdaniel opened this issue · 1 comments

Is typescript and ssr supported?

For TS the following shim works for me (Vue 2.x):

declare module 'v-hotkey' {
  import { DirectiveOptions, PluginFunction } from 'vue';

  type Plugin = {
    install: PluginFunction<{ [alias in string]?: number }>;
    directive: DirectiveOptions;
  };

  const plugin: Plugin;

  export default plugin;
}