declare var sinon: Sinon.SinonStatic;
import * as moment from "moment";

declare module "moment" {
    export type MomentFormatSpecification = string;
}

export = moment;

import { SinonStatic } from 'sinon';

declare global {
  const sinon: SinonStatic;
}

import * as moment from "moment";

declare module "moment" {
    export type MomentFormatSpecification = string;
}

export = moment;

Declare sinon as a global
Declare sinon as a global

The latest sinon types don't have sinon as a global anymore, so we have to provide a shim for that.
