npm.io
4.0.7 • Published 2 years ago

@types/vue-moment

Licence
MIT
Version
4.0.7
Deps
2
Size
4 kB
Vulns
1
Weekly
0
Stars
51.4K

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

import { Duration, DurationInputArg1, DurationInputArg2, Moment, MomentFormatSpecification, MomentInput } 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

  • Last updated: Tue, 07 Nov 2023 1536 GMT
  • Dependencies: moment, vue

Credits

These definitions were written by Dominik Schmidt.