vue-mq
vue-mq copied to clipboard
Typescript support
Hi,
First of all, thank you for your excellent work. Could you provide typings file in order to be able to work with typescript ?
Thanks that's a good idea, intend to implement when I have a little time
Any news on this?
+1
+1
Create a file: vue-mq.d.ts
declare module 'vue-mq' {
import {PluginObject} from 'vue';
interface VueMq extends PluginObject<any> {
VueMq: VueMq;
}
const VueMq: VueMq;
export default VueMq;
}
Or an alternative for it: https://www.npmjs.com/package/vue-media-q
I only need this at present,
// declaration.d.ts
import Vue from 'vue'
declare module 'vue/types/vue' {
interface Vue {
$mq: 'sm' | 'md' | 'lg' // Or keyof BreakpointRecord
}
}
Does still library provide typescript yet?? It will be really great if we have typescript version for this package.
Thanks that's a good idea, intend to implement when I have a little time
@AlexandreBonaventure
Any news??