4.0.7 • Published 6 months ago

@types/vue-moment v4.0.7

Weekly downloads
5,989
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/vue-moment

Summary

This package contains type definitions for vue-moment (https://github.com/brockpetrie/vue-moment).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/vue-moment.

index.d.ts

// 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, Duration, DurationInputArg2, DurationInputArg1 } from 'moment';
import { PluginObject } from 'vue';

declare namespace VueMomentPlugin {
    interface Options {
        // The optional (self-maintained) moment instance
        moment?: Moment | undefined;
    }

    interface VueStatic extends Moment {
        (options: Options): void;
        (inp?: MomentInput, format?: MomentFormatSpecification, strict?: boolean): Moment;
        (inp?: MomentInput, format?: MomentFormatSpecification, language?: string, strict?: boolean): Moment;
        duration(inp?: DurationInputArg1, unit?: DurationInputArg2): Duration;
    }
}

declare module 'vue/types/vue' {
    interface Vue {
        $moment: VueMomentPlugin.VueStatic;
    }
}

interface VueMoment extends PluginObject<undefined> {}

declare const VueMoment: VueMoment;
export = VueMoment;

Additional Details

Credits

These definitions were written by Dominik Schmidt.

4.0.5

7 months ago

4.0.4

8 months ago

4.0.7

6 months ago

4.0.6

7 months ago

4.0.3

3 years ago

4.0.2

3 years ago

4.0.1

4 years ago

4.0.0

5 years ago