vuejs / devtools-v6

⚙️ Browser devtools extension for debugging Vue.js applications.
https://devtools-v6.vuejs.org/
MIT License
24.63k stars 4.15k forks source link

Typescript declaration file .d.ts #759

Open drozdzynski opened 6 years ago

drozdzynski commented 6 years ago

What problem does this feature solve?

Could not find a declaration file for module '@vue/devtools'.

What does the proposed API look like?

Better support for Typescript

cybercussion commented 5 years ago

I'll add a couple comments on this. At the base I created a:

declare module '@vue/devtools' {
    export function connect(host?: string, port?: number | string): void
}

to my shims-vue-d.ts. This made the red go away.

However, since dev tools is imported now, I don't think there is a easy way to exclude this for a production case.
import devtools from '@vue/devtools';

if (process.env.NODE_ENV === 'development') {
    Vue.config.devtools = true;
    devtools.connect('http://localhost', 8098);
}

Regardless of the above I notice my external Devtools via Electron is stating there is 'No Vuex store detected.', but if I go back to just dropping in the Githubissues.

  • Githubissues is a development platform for aggregating issues.