Skip to content

Add GlobalComponents declaration and specific component exports #261

@yannmichaux

Description

@yannmichaux

Hi,

Since the Vue 3 plugin registers global components, could you provide a direct augmentation of the Vue module? This would allow us to leverage type inference and other TypeScript features when using the library.

It's done like this :

declare module 'vue' {
  export interface GlobalComponents {
    Test: typeof import('./src/Test.vue')['default'];
  }
}

Doc: Vue.JS - Global-Component-Types.

--
Also, is it possible to provide specific imports for these components, for example :

import { VStage, VLayer, VLine } from 'vue-konva'

I think it will close #222 , #164 and #144

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions