#Typescript type to reference key of other property of same type
11 messages · Page 1 of 1 (latest)
Not when you are assigning it to the variable
So it has to pop out of a function or something
The context is I am trying to define an app.config in nuxt, and normal vuetify thing is broken, so I'm trying to go something like
export default defineAppConfig<{ vuetify: VuetifyConfig }>({
vuetify: {
defaultTheme: 'eggplant',
themes: {
dark: {
dark: true,
// did you know vuetify 3 forgot to export these colours
// even though the documentation says you can do this?
// colors: {
// // primary: colors.blue.darken2,
// // accent: colors.grey.darken3,
// // secondary: colors.amber.darken3,
// // info: colors.teal.lighten1,
// // warning: colors.amber.base,
// // error: colors.deepOrange.accent4,
// // success: colors.green.accent3,
// }
},
},
},
})
but type it.
I can ignore this and just do defaultTheme: string but there's a part of me that is going "There's a better way!"
Not sure how to trigger hot-module theme updates but just having to force-reload when this happens is fine.
christ on a cracker I have not had to fanagle this kinda horseshit in a while.
Vuetify 3 is "broken" in context of nuxt. I am annoyed.
I am kinda annoyed at intellisense in-regards-to <v-thing> in the template area.
I also had to hamfist a module to hide away the vuetify stuff, and I am unsure how to make vuetify respond to changes in appConfig or where the correct place for that is.
I am slowly converting an app I had.