vuetifyjs / vue-cli-plugins

🔌 A collection of Vuetify plugins for Vue CLI
https://vuetifyjs.com/en/getting-started/quick-start#vue-cli-3
Other
427 stars 113 forks source link

[Feature Request] ThemeDefinition namespace Doesnt work correctly #327

Closed smartcontentor closed 2 years ago

smartcontentor commented 2 years ago

Problem to solve

ThemeDefinition namespace in vuetify.js can`t use as a type;

Proposed solution

i don`t have any idea

spras commented 2 years ago

same here:

"version": "3.0.0-beta.5"

import { createVuetify } from 'vuetify'
import type { ThemeDefinition } from 'vuetify'

const Lighttheme: ThemeDefinition = {
    dark: false,
    variables: {},
    colors: {
        primary: '#186dde',
        info: '#7460ee',
        success: '#0acc95',
        accent: '#fc4b6c',
        warning: '#fec90f',
        error: '#ef5350',
        secondary: '#0acc95',
    },
}

And typescript complains :

src/plugins/vuetify.ts:8:19 - error TS2709: Cannot use namespace 'ThemeDefinition' as a type.

8 const Lighttheme: ThemeDefinition = {
KaelWD commented 2 years ago

https://github.com/microsoft/TypeScript/issues/27311