Skip to content

How to extend component options type definition? #5951

Answered by LinusBorg
b12k asked this question in Help/Questions
Discussion options

You must be logged in to vote

https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties

In order to take advantage of module augmentation, you will need to ensure the augmentation is placed in a TypeScript module. That is to say, the file needs to contain at least one top-level import or export, even if it is just export {}. If the augmentation is placed outside of a module, it will overwrite the original types rather than augmenting them!

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@b12k
Comment options

@tony19
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by b12k
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants