One of my data types is called "student."
export interface Student {
name: string,
age: number
}
I am looking to associate this type with a student's information.
data() {
const tommy: Student = {}
return {
tommy,
}
However, I noticed that when I set a string as the value for this data in the mounted hook, no warnings or errors are displayed.
async mounted() {
this.tommy= 'Tommy Smith'
What is the correct way to define custom data types in Vue using TypeScript?