mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-18 12:08:59 +08:00
fix type error
This commit is contained in:
6
types/react-ga/index.d.ts
vendored
6
types/react-ga/index.d.ts
vendored
@@ -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;
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user