From fb1d30cbf8eed4f61ef7cca755107fddfef268be Mon Sep 17 00:00:00 2001 From: bglee Date: Sun, 9 Apr 2017 15:48:06 +0900 Subject: [PATCH] fix type error --- types/react-ga/index.d.ts | 6 +++--- types/react-ga/react-ga-tests.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/types/react-ga/index.d.ts b/types/react-ga/index.d.ts index d951cb2909..66e8140299 100644 --- a/types/react-ga/index.d.ts +++ b/types/react-ga/index.d.ts @@ -46,7 +46,7 @@ export interface TimingArgs { export interface Plugin { require(name: string, options: any): void; - execute(pluginName: string, action: string, actionTypeOrPayload: string|Object, payload?: Object): void; + execute(pluginName: string, action: string, actionTypeOrPayload: string|any, payload?: any): void; } export interface OutboundLinkArgs { @@ -54,7 +54,7 @@ export interface OutboundLinkArgs { } export function initialize(trackingCode: string, options?: InitializeOptions): void; -export function ga(): Function; +export function ga(): any; export function set(fieldsObject: FieldsObject): void; export function send(fieldsObject: FieldsObject): void; export function pageview(path: string): void; @@ -63,4 +63,4 @@ export function timing(args: TimingArgs): void; export function event(args: EventArgs): void; export function exception(fieldsObject: FieldsObject): void; export const plugin: Plugin; -export function outboundLink(args: OutboundLinkArgs, hitCallback: Function): void; +export function outboundLink(args: OutboundLinkArgs, hitCallback: () => void): void; diff --git a/types/react-ga/react-ga-tests.ts b/types/react-ga/react-ga-tests.ts index 4396cf9644..57d2162e0e 100644 --- a/types/react-ga/react-ga-tests.ts +++ b/types/react-ga/react-ga-tests.ts @@ -61,7 +61,7 @@ describe("Testing react-ga set calls", () => { describe("Testing react-ga v2.1.2", () => { it("Able to make ga calls", () => { - const gaObject: Function = ga.ga(); + ga.ga(); }); it("Able to make send calls", () => { let fieldObject: ga.FieldsObject = { @@ -76,7 +76,7 @@ describe("Testing react-ga v2.1.2", () => { variable: 'string', value: 1, label: 'string' - }) + }); }); it("Able to make exception calls", () => { let fieldObject: ga.FieldsObject = {