import { SinonStatic } from 'sinon';

declare global {
  const sinon: SinonStatic;
}

import * as moment from "moment";

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

export = moment;

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

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

export = moment;

--- 
+++ 
@@ -1,4 +1,9 @@
-declare var sinon: Sinon.SinonStatic;
+import { SinonStatic } from 'sinon';
+
+declare global {
+  const sinon: SinonStatic;
+}
+
 import * as moment from "moment";
 
 declare module "moment" {
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.
