DefinitelyTyped/types/vue-moment/index.d.ts
domschmidt 8ce9123591 Vue moment types (#38435)
* added vue the mask types

* added types for vue-moment

* added types for vue-moment

* added types for vue-moment
replaced void by undefined
2019-09-25 09:40:13 -07:00

33 lines
1018 B
TypeScript

// Type definitions for vue-moment 4.0
// Project: https://github.com/brockpetrie/vue-moment
// Definitions by: Dominik Schmidt <https://github.com/domschmidt>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.7
import { Moment, MomentFormatSpecification, MomentInput } from 'moment';
import { PluginObject } from 'vue';
declare namespace VueMomentPlugin {
interface Options {
// The optional (self-maintained) moment instance
moment?: Moment;
}
interface VueStatic extends Moment {
(options: Options): void;
(inp?: MomentInput, format?: MomentFormatSpecification, strict?: boolean): Moment;
(inp?: MomentInput, format?: MomentFormatSpecification, language?: string, strict?: boolean): Moment;
}
}
declare module 'vue/types/vue' {
interface Vue {
$moment: VueMomentPlugin.VueStatic;
}
}
interface VueMoment extends PluginObject<undefined> {}
declare const VueMoment: VueMoment;
export = VueMoment;