Answer the question
In order to leave comments, you need to log in
How to type the contents of $options?
Good day.
The $options object in Vue is typed as a VueOptions object (something similar) that holds string keys and any values.
I'm looking for a way to limit the types of data available for saving to this object, so that you can't throw anything - firstly, and so that when you hover over a line like this.$options.property in the IDE, the correct property type is highlighted - secondly (now highlighted any, putting a typed property in $options does not solve either of the two problems). To be something like this:
type $options {
key: string,
value: GenericOption
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question