export amplitude type because amplitude-js is a UMD module

Without doing this, tsc complains that node_modules/@types/amplitude-js/index.d.ts is not a module
This commit is contained in:
Ryan Price
2019-01-17 00:11:15 -05:00
parent 33f6179e0f
commit d471f9f443
2 changed files with 6 additions and 1 deletions
+2
View File
@@ -1,5 +1,7 @@
// Tests for Amplitude SDK TypeScript definitions
import amplitude = require('amplitude-js');
module Amplitude.Tests {
function all() {
+4 -1
View File
@@ -4,7 +4,10 @@
// Dan Manastireanu <https://github.com/danmana>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module amplitude {
export = amplitude;
export as namespace amplitude;
declare namespace amplitude {
type Callback = (responseCode: number, responseBody: string, details?: { reason: string; }) => void;
type LogReturn = number | void;